mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
0f77f465ff
commit
b58e0bd8bb
39 changed files with 176 additions and 173 deletions
|
|
@ -38,8 +38,8 @@ class ExceptionClassTests(unittest.TestCase):
|
|||
last_exc = getattr(builtins, superclass_name)
|
||||
except AttributeError:
|
||||
self.fail("base class %s not a built-in" % superclass_name)
|
||||
self.assertTrue(superclass_name in exc_set,
|
||||
'%s not found' % superclass_name)
|
||||
self.assertIn(superclass_name, exc_set,
|
||||
'%s not found' % superclass_name)
|
||||
exc_set.discard(superclass_name)
|
||||
superclasses = [] # Loop will insert base exception
|
||||
last_depth = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue