Merge pull request #1730 from RedBeardCode/pytest-1536
Added confcutdir in testing/test_conftest.py::test_conftest_import_or…
This commit is contained in:
commit
350ebc9167
|
@ -1586,7 +1586,8 @@ class TestAutouseManagement:
|
|||
def test_2(self):
|
||||
pass
|
||||
""")
|
||||
reprec = testdir.inline_run("-v","-s")
|
||||
confcut = "--confcutdir={0}".format(testdir.tmpdir)
|
||||
reprec = testdir.inline_run("-v","-s", confcut)
|
||||
reprec.assertoutcome(passed=8)
|
||||
config = reprec.getcalls("pytest_unconfigure")[0].config
|
||||
l = config.pluginmanager._getconftestmodules(p)[0].l
|
||||
|
|
|
@ -203,6 +203,7 @@ def test_conftest_import_order(testdir, monkeypatch):
|
|||
def impct(p):
|
||||
return p
|
||||
conftest = PytestPluginManager()
|
||||
conftest._confcutdir = testdir.tmpdir
|
||||
monkeypatch.setattr(conftest, '_importconftest', impct)
|
||||
assert conftest._getconftestmodules(sub) == [ct1, ct2]
|
||||
|
||||
|
|
Loading…
Reference in New Issue