From 09256d9c939a1600e3bd1598fed18a40149dbf56 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 1 Feb 2020 15:22:41 -0800 Subject: [PATCH] add coverage for when there isn't a loader.. --- casimport/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/casimport/__init__.py b/casimport/__init__.py index b58be4c..34f0a17 100644 --- a/casimport/__init__.py +++ b/casimport/__init__.py @@ -176,6 +176,10 @@ class Test(unittest.TestCase): # That a CASFinder f = CASFinder() + # make sure that we can't import anything at first + with self.assertRaises(ImportError): + import cas.v1_f_2398472398 + # when registering the fixtures directory f.register(FileDirCAS(self.fixtures))