[issue19166] Unusued variable in test_keys in Lib/test/test_dict.py

2013-10-04 Thread Vajrasky Kok

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 rep...@bugs.python.org
http://bugs.python.org/issue19166
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19166] Unusued variable in test_keys in Lib/test/test_dict.py

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 92c2e76ca595 by Ezio Melotti in branch '2.7':
#19166: use an unused var in a test.  Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/92c2e76ca595

New changeset 33bbc60705e8 by Ezio Melotti in branch '3.3':
#19166: use an unused var in a test.  Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/33bbc60705e8

New changeset 16a88d026571 by Ezio Melotti in branch 'default':
#19166: merge with 3.3.
http://hg.python.org/cpython/rev/16a88d026571

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19166
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19166] Unusued variable in test_keys in Lib/test/test_dict.py

2013-10-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee:  - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement
versions: +Python 2.7, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19166
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com