Skip to content

Commit

Permalink
Patch $ASTRALITY_CONFIG_HOME in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobGM committed May 23, 2018
1 parent c4ca16b commit 7aa5483
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions astrality/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,14 @@ def patch_xdg_directory_standard(tmpdir, monkeypatch, request):
# Delete directory for next test
if data_dir.exists():
shutil.rmtree(str(data_dir))


@pytest.fixture(autouse=True, scope='session')
def patch_astrality_config_home(tmpdir, monkeypatch, request):
"""Patch $ASTRALITY_CONFIG_HOME"""
example_config = Path(__file__).parents[2] / 'config'
monkeypatch.setitem(
os.environ,
'ASTRALITY_CONFIG_HOME',
str(example_config),
)

0 comments on commit 7aa5483

Please sign in to comment.