diff --git a/_pytest/python.py b/_pytest/python.py index 8f50da133..51b158ad1 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1419,7 +1419,7 @@ class FixtureManager: if p.basename.startswith("conftest.py"): nodeid = p.dirpath().relto(self.session.fspath) if p.sep != "/": - nodeid.replace(p.sep, "/") + nodeid = nodeid.replace(p.sep, "/") self.parsefactories(plugin, nodeid) self._seenplugins.add(plugin)