fixtures: replace a startswith("conftest.py") with == "conftest.py"

I can't imagine why we would want to test for a prefix here.
This commit is contained in:
Ran Benita
2023-07-10 01:20:01 +03:00
parent 7967b2e710
commit 2c80de532f

View File

@@ -1471,7 +1471,7 @@ class FixtureManager:
# Construct the base nodeid which is later used to check
# what fixtures are visible for particular tests (as denoted
# by their test id).
if p.name.startswith("conftest.py"):
if p.name == "conftest.py":
try:
nodeid = str(p.parent.relative_to(self.config.rootpath))
except ValueError: