[New-bugs-announce] [issue19166] Unusued variable in test_keys in Lib/test/test_dict.py
Vajrasky Kok
report at bugs.python.org
Fri Oct 4 17:53:20 CEST 2013
New submission from Vajrasky Kok:
This is the test.
def test_keys(self):
d = {}
self.assertEqual(set(d.keys()), set())
d = {'a': 1, 'b': 2}
k = d.keys()
self.assertIn('a', d)
self.assertIn('b', d)
self.assertRaises(TypeError, d.keys, None)
self.assertEqual(repr(dict(a=1).keys()), "dict_keys(['a'])")
As you can see, the variable k is never used. Attached the patch to give purpose to variable k.
----------
components: Tests
files: fix_test_dict_unused_variable.patch
keywords: patch
messages: 198957
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Unusued variable in test_keys in Lib/test/test_dict.py
versions: Python 3.4
Added file: http://bugs.python.org/file31958/fix_test_dict_unused_variable.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19166>
_______________________________________
More information about the New-bugs-announce
mailing list