Skip to content

Commit 2c80de5

Browse files
committed
fixtures: replace a startswith("conftest.py") with == "conftest.py"
I can't imagine why we would want to test for a prefix here.
1 parent 7967b2e commit 2c80de5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ def pytest_plugin_registered(self, plugin: _PluggyPlugin) -> None:
14711471
# Construct the base nodeid which is later used to check
14721472
# what fixtures are visible for particular tests (as denoted
14731473
# by their test id).
1474-
if p.name.startswith("conftest.py"):
1474+
if p.name == "conftest.py":
14751475
try:
14761476
nodeid = str(p.parent.relative_to(self.config.rootpath))
14771477
except ValueError:

0 commit comments

Comments
 (0)