Skip to content

Commit 224ef67

Browse files
committed
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
1 parent 4ed412e commit 224ef67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

testing/test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ def test_setuppy_fallback(self, tmpdir):
592592
assert inicfg == {}
593593

594594
def test_nothing(self, tmpdir):
595+
tmpdir.chdir()
595596
rootdir, inifile, inicfg = determine_setup(None, [tmpdir])
596597
assert rootdir == tmpdir
597598
assert inifile is None
@@ -603,6 +604,7 @@ def test_with_specific_inifile(self, tmpdir):
603604
assert rootdir == tmpdir
604605

605606
def test_with_arg_outside_cwd_without_inifile(self, tmpdir):
607+
tmpdir.chdir()
606608
a = tmpdir.mkdir("a")
607609
b = tmpdir.mkdir("b")
608610
rootdir, inifile, inicfg = determine_setup(None, [a, b])

0 commit comments

Comments
 (0)