Quick fix for tests in config depended on the current directory

When running those tests from pytest's root folder, they would
fail because they would end up picking pytest's own pytest.ini
This commit is contained in:
Bruno Oliveira 2016-08-17 20:32:25 -03:00
parent 4ed412eb59
commit 224ef67374
1 changed files with 2 additions and 0 deletions

View File

@ -592,6 +592,7 @@ class TestRootdir:
assert inicfg == {}
def test_nothing(self, tmpdir):
tmpdir.chdir()
rootdir, inifile, inicfg = determine_setup(None, [tmpdir])
assert rootdir == tmpdir
assert inifile is None
@ -603,6 +604,7 @@ class TestRootdir:
assert rootdir == tmpdir
def test_with_arg_outside_cwd_without_inifile(self, tmpdir):
tmpdir.chdir()
a = tmpdir.mkdir("a")
b = tmpdir.mkdir("b")
rootdir, inifile, inicfg = determine_setup(None, [a, b])