mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
use assert[Not]IsInstance where appropriate
This commit is contained in:
parent
f14c7fc33d
commit
b0f5adc3f4
57 changed files with 269 additions and 272 deletions
|
@ -92,12 +92,12 @@ class PyclbrTest(TestCase):
|
|||
self.assertHasattr(module, name, ignore)
|
||||
py_item = getattr(module, name)
|
||||
if isinstance(value, pyclbr.Function):
|
||||
self.assertTrue(isinstance(py_item, (FunctionType, BuiltinFunctionType)))
|
||||
self.assertIsInstance(py_item, (FunctionType, BuiltinFunctionType))
|
||||
if py_item.__module__ != moduleName:
|
||||
continue # skip functions that came from somewhere else
|
||||
self.assertEquals(py_item.__module__, value.module)
|
||||
else:
|
||||
self.assertTrue(isinstance(py_item, (ClassType, type)))
|
||||
self.assertIsInstance(py_item, (ClassType, type))
|
||||
if py_item.__module__ != moduleName:
|
||||
continue # skip classes that came from somewhere else
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue