Skip to content

Commit

Permalink
Fix version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
youtux committed Jan 21, 2024
1 parent d7edd31 commit e455532
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pytest_factoryboy/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from _pytest.fixtures import FixtureDef, FixtureManager
from _pytest.nodes import Node
from packaging.version import Version
from packaging.version import parse as parse_version

pytest_version = parse_version(version("pytest"))
Expand All @@ -30,7 +29,7 @@ def path_with_stem(path: pathlib.Path, stem: str) -> pathlib.Path:
return path.with_name(stem + path.suffix)


if pytest_version >= Version("8.1"):
if pytest_version.release >= (8, 1):

Check warning on line 33 in pytest_factoryboy/compat.py

View check run for this annotation

Codecov / codecov/patch

pytest_factoryboy/compat.py#L33

Added line #L33 was not covered by tests
def getfixturedefs(fixturemanager: FixtureManager, fixturename: str, node: Node) -> Sequence[FixtureDef] | None:
return fixturemanager.getfixturedefs(fixturename, node)
Expand Down

0 comments on commit e455532

Please sign in to comment.