From 224ef673740c519ebd1dcbc9f6688529c5ae0a9e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 17 Aug 2016 20:32:25 -0300 Subject: [PATCH] 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 --- testing/test_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/test_config.py b/testing/test_config.py index 1997ddacd..5a75f7d60 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -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])