classification
Title: enumerate() test cases do not cover optional start argument
Type: behavior Stage: resolved
Components: Interpreter Core, Tests Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, benjamin.peterson, mark.dickinson, scott.dial
Priority: normal Keywords: patch

Created on 2010-05-06 13:48 by scott.dial, last changed 2010-06-21 16:55 by eric.araujo. This issue is now closed.

Files
File name Uploaded Description Edit
test_enumerate.patch scott.dial, 2010-05-06 13:48 fix test cases for enumerate() with start=
Messages (5)
msg105147 - (view) Author: Scott Dial (scott.dial) Date: 2010-05-06 13:48
The issue2831 patch test cases are not actually being run by test_enumerate and they were broken tests anyways. This patch fixes the brokenness.
msg105155 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-05-06 18:32
The patch looks fine, but I wonder if regrtest.py could be taught to warn about situations like this.  Maybe run_unitest() should check that all leaf subclasses of TestCase in the module are covered.  Ideally, of course, test_main() should be made optional and tests be discovered by analyzing the test_* module.
msg105314 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-05-08 16:46
Fixed in r80991. Thanks for the patch.
msg106470 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-05-25 19:42
It looks like there's still a bit of brokenness here:  when I run test_enumerate by itself:

./python.exe Lib/test/test_enumerate.py

I get the following:

Traceback (most recent call last):
  File "Lib/test/test_enumerate.py", line 253, in <module>
    test_main(verbose=True)
  File "Lib/test/test_enumerate.py", line 248, in test_main
    test_support.run_unittest(*testclasses)
NameError: global name 'testclasses' is not defined
[76533 refs]
msg106471 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-05-25 19:48
NameError fixed in r81527 through r81530.
History
Date User Action Args
2010-06-21 16:55:19eric.araujosetstage: patch review -> resolved
2010-05-25 19:48:48mark.dickinsonsetmessages: + msg106471
2010-05-25 19:42:36mark.dickinsonsetnosy: + mark.dickinson
messages: + msg106470
2010-05-08 16:46:07benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg105314

resolution: fixed
2010-05-06 18:32:12belopolskysetnosy: + belopolsky

messages: + msg105155
stage: patch review
2010-05-06 13:48:08scott.dialcreate