Skip to content

Commit d6fd480

Browse files
committed
tests: Run unittests with custom HOME
Signed-off-by: Cole Robinson <[email protected]>
1 parent 4e80f1a commit d6fd480

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ def pytest_configure(config):
6666
if config.getoption("--regenerate-output"):
6767
tests.CLICONFIG.REGENERATE_OUTPUT = config.getoption(
6868
"--regenerate-output")
69+
if not (config.getoption("--ro-functional") or
70+
config.getoption("--rw-functional")):
71+
# Functional tests need access to HOME cached auth.
72+
# Unit tests shouldn't be touching any HOME files
73+
os.environ["HOME"] = os.path.dirname(__file__) + "/data/homedir"
6974

7075

7176
@pytest.fixture

0 commit comments

Comments
 (0)