Skip to content

Commit

Permalink
update regression tests to succeed locally
Browse files Browse the repository at this point in the history
  • Loading branch information
gidden committed Nov 2, 2019
1 parent 4c4c1ec commit 073b425
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
here = join(os.path.dirname(os.path.realpath(__file__)))
ci_path = join(here, 'ci')

# check variables for if we are on CI (will then run regression tests)
ON_CI_REASON = 'No access to regression test credentials'
try:
os.environ['ANERIS_CI_USER']
ON_CI = True
except KeyError:
ON_CI = False


class TestHarmonizeRegression():

Expand Down Expand Up @@ -91,14 +99,14 @@ def _run_ci(self, name):
self._run(inf, checkf, hist, reg, rc, outf, prefix)

# only runs if access to regression data is available
@pytest.mark.skipif(not os.environ['ANERIS_CI_USER'], reason='No access to regression test credentials')
@pytest.mark.skipif(not ON_CI, reason=ON_CI_REASON)
def test_msg(self):
# file setup
name = 'msg'
self._run_ci(name)

# only runs if access to regression data is available
@pytest.mark.skipif(not os.environ['ANERIS_CI_USER'], reason='No access to regression test credentials')
@pytest.mark.skipif(not ON_CI, reason=ON_CI_REASON)
def test_gcam(self):
# file setup
name = 'gcam'
Expand Down

0 comments on commit 073b425

Please sign in to comment.