From 8acadb530e27cc8a1afe550d3575b99ed0716761 Mon Sep 17 00:00:00 2001 From: acpaquette Date: Tue, 14 Jul 2020 16:39:15 -0700 Subject: [PATCH] ALE Spice Directory Fix (#382) * Set mission directories to an empty list if ALESPICEROOT is not set * Removed ALESPICEROOT environment variable not set warning * Add and update tests for when no ALESPICEROOT is set --- ale/__init__.py | 1 - tests/pytests/test_env.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ale/__init__.py b/ale/__init__.py index 08269ea76..8e156801e 100644 --- a/ale/__init__.py +++ b/ale/__init__.py @@ -19,7 +19,6 @@ try: spice_root = os.environ['ALESPICEROOT'] except: - warnings.warn('ALESPICEROOT environment variable not set, Spice Drivers will not function correctly') spice_root = None # bring ale stuff into main ale module diff --git a/tests/pytests/test_env.py b/tests/pytests/test_env.py index 9263d46fc..67a07d160 100644 --- a/tests/pytests/test_env.py +++ b/tests/pytests/test_env.py @@ -6,9 +6,8 @@ def test_env_not_set(monkeypatch): monkeypatch.delenv('ALESPICEROOT', raising=False) - with pytest.warns(UserWarning, match='ALESPICEROOT environment variable not set'): - reload(ale) - assert not ale.spice_root + reload(ale) + assert not ale.spice_root def test_env_set(monkeypatch): monkeypatch.setenv('ALESPICEROOT', '/foo/bar')