diff options
-rw-r--r-- | pym/portage/tests/lint/test_import_modules.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pym/portage/tests/lint/test_import_modules.py b/pym/portage/tests/lint/test_import_modules.py index cee579a3a..c0551c7be 100644 --- a/pym/portage/tests/lint/test_import_modules.py +++ b/pym/portage/tests/lint/test_import_modules.py @@ -10,8 +10,17 @@ from portage import _unicode_decode class ImportModulesTestCase(TestCase): def testImportModules(self): + expected_failures = frozenset(( + "portage.cache.ebuild_xattr", #automagic dep on xattr + )) + for mod in self._list_modules(PORTAGE_PYM_PATH): - __import__(mod) + try: + __import__(mod) + except ImportError as e: + if mod not in expected_failures: + self.assertTrue(False, "failed to import '%s': %s" % (mod, e)) + del e def _list_modules(self, base_dir): all_modules = [] |