mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
8cd0a66a0f
commit
aa98058cc4
86 changed files with 622 additions and 599 deletions
|
@ -27,7 +27,7 @@ class TestGdbm(unittest.TestCase):
|
|||
self.assertTrue(self.g.has_key('a'))
|
||||
key = self.g.firstkey()
|
||||
while key:
|
||||
self.assertTrue(key in key_set)
|
||||
self.assertIn(key, key_set)
|
||||
key_set.remove(key)
|
||||
key = self.g.nextkey(key)
|
||||
self.assertRaises(KeyError, lambda: self.g['xxx'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue