We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7edd31 commit e455532Copy full SHA for e455532
pytest_factoryboy/compat.py
@@ -7,7 +7,6 @@
7
8
from _pytest.fixtures import FixtureDef, FixtureManager
9
from _pytest.nodes import Node
10
-from packaging.version import Version
11
from packaging.version import parse as parse_version
12
13
pytest_version = parse_version(version("pytest"))
@@ -30,7 +29,7 @@ def path_with_stem(path: pathlib.Path, stem: str) -> pathlib.Path:
30
29
return path.with_name(stem + path.suffix)
31
32
33
-if pytest_version >= Version("8.1"):
+if pytest_version.release >= (8, 1):
34
35
def getfixturedefs(fixturemanager: FixtureManager, fixturename: str, node: Node) -> Sequence[FixtureDef] | None:
36
return fixturemanager.getfixturedefs(fixturename, node)
0 commit comments