fix issue616 - conftest visibility fixes. This is achieved by
refactoring how nodeid's are constructed. They now are always relative to the "common rootdir" of a test run which is determined by finding a common ancestor of all testrun arguments. --HG-- branch : issue616
This commit is contained in:
@@ -1653,11 +1653,9 @@ class FixtureManager:
|
||||
# what fixtures are visible for particular tests (as denoted
|
||||
# by their test id)
|
||||
if p.basename.startswith("conftest.py"):
|
||||
nodeid = self.session.fspath.bestrelpath(p.dirpath())
|
||||
nodeid = p.dirpath().relto(self.config.rootdir)
|
||||
if p.sep != "/":
|
||||
nodeid = nodeid.replace(p.sep, "/")
|
||||
if nodeid == ".":
|
||||
nodeid = ""
|
||||
self.parsefactories(plugin, nodeid)
|
||||
self._seenplugins.add(plugin)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user