test_pyclbr goes nuts when a module contains code to try importing a class
and provide a substitute if the import fails, because pyclbr sees the class definition. Changed to ignore such cases' base classes and methods, since they will not match.
This commit is contained in:
parent
9582c148b6
commit
742cd24c02
|
@ -95,6 +95,9 @@ class PyclbrTest(TestCase):
|
|||
self.assert_(isinstance(py_item, (FunctionType, BuiltinFunctionType)))
|
||||
else:
|
||||
self.failUnless(isinstance(py_item, (ClassType, type)))
|
||||
if py_item.__module__!=moduleName:
|
||||
continue # skip classes that came from somewhere else
|
||||
|
||||
real_bases = [base.__name__ for base in py_item.__bases__]
|
||||
pyclbr_bases = [ getattr(base, 'name', base)
|
||||
for base in value.super ]
|
||||
|
|
Loading…
Reference in New Issue