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