diff --git a/tests/runtests.py b/tests/runtests.py
index 955f96d..996ed7c 100755
|
a
|
b
|
SUBDIRS_TO_SKIP = [
|
| 45 | 45 | 'import_error_package', |
| 46 | 46 | 'test_discovery_sample', |
| 47 | 47 | 'test_discovery_sample2', |
| | 48 | 'test_discovery_import_error', |
| 48 | 49 | 'test_runner_deprecation_app', |
| 49 | 50 | ] |
| 50 | 51 | |
diff --git a/tests/test_discovery_import_error/__init__.py b/tests/test_discovery_import_error/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_discovery_import_error/tests.py b/tests/test_discovery_import_error/tests.py
new file mode 100644
index 0000000..1f3ce16
|
-
|
+
|
|
| | 1 | import notexistmodule # Kadoom |
diff --git a/tests/test_runner/test_discover_runner.py b/tests/test_runner/test_discover_runner.py
index dc82c24..083ace0 100644
|
a
|
b
|
class DiscoverRunnerTest(TestCase):
|
| 165 | 165 | |
| 166 | 166 | def test_overrideable_test_loader(self): |
| 167 | 167 | self.assertEqual(DiscoverRunner().test_loader, defaultTestLoader) |
| | 168 | |
| | 169 | def test_import_error_in_tests_module(self): |
| | 170 | with self.assertRaises(ImportError) as cm: |
| | 171 | DiscoverRunner().build_suite( |
| | 172 | ["test_discovery_sample.tests_discovery_import_error"], |
| | 173 | ) |
| | 174 | self.assertEqual(cm.exception.message, 'No module named notexistmodule') |