Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvalbenarie committed Apr 19, 2023
1 parent 0c69953 commit 6158fac
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_queryset.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@ async def test_slicing_count(self) -> None:

def test_slicing_negative_values(self) -> None:
with self.assertRaisesRegex(
expected_exception=ParamsError,
expected_regex="Slice start should be non-negative number or None.",
expected_exception=ParamsError,
expected_regex="Slice start should be non-negative number or None.",
):
_ = IntFields.all()[-1:]

with self.assertRaisesRegex(
expected_exception=ParamsError,
expected_regex="Slice stop should be non-negative number greater that slice start, "
"or None.",
expected_exception=ParamsError,
expected_regex="Slice stop should be non-negative number greater that slice start, "
"or None.",
):
_ = IntFields.all()[:-1]

def test_slicing_stop_before_start(self) -> None:
with self.assertRaisesRegex(
expected_exception=ParamsError,
expected_regex="Slice stop should be non-negative number greater that slice start, "
"or None.",
expected_exception=ParamsError,
expected_regex="Slice stop should be non-negative number greater that slice start, "
"or None.",
):
_ = IntFields.all()[2:1]

Expand All @@ -116,8 +116,8 @@ async def test_slicing_steps(self) -> None:
self.assertSequenceEqual(await sliced_queryset, await manually_sliced_queryset)

with self.assertRaisesRegex(
expected_exception=ParamsError,
expected_regex="Slice steps should be 1 or None.",
expected_exception=ParamsError,
expected_regex="Slice steps should be 1 or None.",
):
_ = IntFields.all()[::2]

Expand Down

0 comments on commit 6158fac

Please sign in to comment.