Skip to content

Commit

Permalink
Broader exception catching in sciunit-create unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Oct 9, 2017
1 parent 18211e3 commit be289e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sciunit/unit_test/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ def setUp(self):
SCIDASH_HOME = os.path.dirname(os.path.dirname(sciunit.__path__[0]))
self.cosmosuite_path = os.path.join(SCIDASH_HOME,'scidash')

def test_scidash_create(self):
def test_sciunit_create(self):
try:
self.main('--directory',self.cosmosuite_path,'create')
except OSError as e:
except Exception as e:
if 'There is already a configuration file' not in str(e):
raise e

def test_scidash_run(self):
def test_sciunit_run(self):
self.main('--directory',self.cosmosuite_path,'run')

def test_scidash_make_nb(self):
def test_sciunit_make_nb(self):
self.main('--directory',self.cosmosuite_path,'make-nb')

# Skip for python versions that don't have importlib.machinery
@unittest.skipIf(platform.python_version()<'3.3',
"run-nb not supported on Python < 3.3")
def test_scidash_run_nb(self):
def test_sciunit_run_nb(self):
self.main('--directory',self.cosmosuite_path,'run-nb')


Expand Down

0 comments on commit be289e6

Please sign in to comment.