summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2011-01-31 08:30:26 +0100
committerZac Medico <zmedico@gentoo.org>2011-02-02 15:23:33 -0800
commitc0de7ffb63f9d1ba121b45a53032fda2139eb5c5 (patch)
tree607f920ad9407987b4789936ee1e907e82ed9ff5 /pym
parent669f35b8b80d005e84967527e962bda0e5dbdae2 (diff)
downloadportage-c0de7ffb63f9d1ba121b45a53032fda2139eb5c5.tar.gz
portage-c0de7ffb63f9d1ba121b45a53032fda2139eb5c5.tar.bz2
portage-c0de7ffb63f9d1ba121b45a53032fda2139eb5c5.zip
test/lint/test_import_modules.py: Better error reporting and expected failures
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/lint/test_import_modules.py11
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 = []