Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/pytest_randomly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def seed_type(string: str) -> str | int:
return int(string)
except ValueError:
raise argparse.ArgumentTypeError(
f"{repr(string)} is not an integer or the string 'last'"
)
f"{string!r} is not an integer or the string 'last'",
) from None


def pytest_addoption(parser: Parser) -> None:
Expand Down Expand Up @@ -200,7 +200,7 @@ def pytest_collection_modifyitems(config: Config, items: list[Item]) -> None:
(
module,
_shuffle_by_class(list(group), seed),
)
),
)

def _module_key(module_item: tuple[ModuleType | None, list[Item]]) -> int:
Expand Down Expand Up @@ -274,6 +274,5 @@ def faker_seed(pytestconfig: Config, request: SubRequest) -> Any:
# pytest_configure hasn't run to set the seed. Fall back to
# Faker's default seed.
return DEFAULT_SEED
else:
result: int = seed + _crc32(request.node.nodeid)
return result
result: int = seed + _crc32(request.node.nodeid)
return result