diff --git a/modules/bindings/tests/test_cadscore.py b/modules/bindings/tests/test_cadscore.py index be3bab50d0bc59943d760bb5dcc86054f479bc3c..c15996e2dfe3c0bc0d8980518c0a8b8c846cf2e7 100644 --- a/modules/bindings/tests/test_cadscore.py +++ b/modules/bindings/tests/test_cadscore.py @@ -18,9 +18,8 @@ class TestCADBindings(unittest.TestCase): cad_read_g_path = settings.Locate('CADscore_read_global_scores.bash') cad_read_l_path = settings.Locate('CADscore_read_local_scores.bash') executable_path = settings.Locate('voroprot2') - except: - print("Could not find CAD score classic executables: ignoring unit tests") - return + except settings.FileNotFound: + self.skipTest("Could not find CAD score classic executables: ignoring unit tests") cad_result = cadscore.CADScore(self.protein, self.protein, label="cad_classic") @@ -47,9 +46,8 @@ class TestCADBindings(unittest.TestCase): # all of the following need to be present voronota_cadscore_path = settings.Locate("voronota-cadscore") executable_path = settings.Locate("voronota") - except: - print("Could not find CAD score voronota executables: ignoring unit tests") - return + except settings.FileNotFound: + self.skipTest("Could not find CAD score voronota executables: ignoring unit tests") cad_result = cadscore.CADScore(self.protein, self.protein, mode="voronota", label="cad_voronota")