Skip to content

Commit e455532

Browse files
committed
Fix version comparison
1 parent d7edd31 commit e455532

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pytest_factoryboy/compat.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from _pytest.fixtures import FixtureDef, FixtureManager
99
from _pytest.nodes import Node
10-
from packaging.version import Version
1110
from packaging.version import parse as parse_version
1211

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

3231

33-
if pytest_version >= Version("8.1"):
32+
if pytest_version.release >= (8, 1):
3433

3534
def getfixturedefs(fixturemanager: FixtureManager, fixturename: str, node: Node) -> Sequence[FixtureDef] | None:
3635
return fixturemanager.getfixturedefs(fixturename, node)

0 commit comments

Comments
 (0)