mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
use assert[Not]In where appropriate
A patch from Dave Malcolm.
This commit is contained in:
parent
a69ba65fdc
commit
577473fe68
75 changed files with 471 additions and 454 deletions
|
@ -93,7 +93,7 @@ class DumbDBMTestCase(unittest.TestCase):
|
|||
def test_write_contains(self):
|
||||
f = dumbdbm.open(_fname)
|
||||
f[b'1'] = b'hello'
|
||||
self.assertTrue(b'1' in f)
|
||||
self.assertIn(b'1', f)
|
||||
f.close()
|
||||
|
||||
def test_write_write_read(self):
|
||||
|
@ -118,7 +118,7 @@ class DumbDBMTestCase(unittest.TestCase):
|
|||
f['1'] = 'a'
|
||||
f.close()
|
||||
f = dumbdbm.open(_fname, 'r')
|
||||
self.assertTrue('\u00fc' in f)
|
||||
self.assertIn('\u00fc', f)
|
||||
self.assertEqual(f['\u00fc'.encode('utf-8')],
|
||||
self._dict['\u00fc'.encode('utf-8')])
|
||||
self.assertEqual(f[b'1'], b'a')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue