mirror of https://github.com/python/cpython
#19166: use an unused var in a test. Patch by Vajrasky Kok.
This commit is contained in:
parent
cb1d96f782
commit
4e1f3d669b
|
@ -45,6 +45,9 @@ class DictTest(unittest.TestCase):
|
||||||
self.assertEqual(set(d.keys()), set())
|
self.assertEqual(set(d.keys()), set())
|
||||||
d = {'a': 1, 'b': 2}
|
d = {'a': 1, 'b': 2}
|
||||||
k = d.keys()
|
k = d.keys()
|
||||||
|
self.assertEqual(set(k), {'a', 'b'})
|
||||||
|
self.assertIn('a', k)
|
||||||
|
self.assertIn('b', k)
|
||||||
self.assertIn('a', d)
|
self.assertIn('a', d)
|
||||||
self.assertIn('b', d)
|
self.assertIn('b', d)
|
||||||
self.assertRaises(TypeError, d.keys, None)
|
self.assertRaises(TypeError, d.keys, None)
|
||||||
|
|
Loading…
Reference in New Issue