nose-devs/nose — Issue #326: Using list() inside a test generator prevents generation
Author: jpellerin
Created: 2011-12-14 16:07:58+00:00
State: open

If a test generator function calls the inbuilt list() function on some
other generator, then the tests are not generated. The attached file is a
minimal example of this problem and the offending line has been marked:

print list(test_items)

If this line is removed, the tests generate correctly.
If the call to list() is removed leaving 'print test_items', the tests
generate correctly (although nothing gets printed).
If test_items is an actual list rather than a generator, the tests generate
correctly.

When I run the attached file I expect to see 4 failing tests. Instead I see
"""Ran 0 tests in 0.001s

OK"""

I'm using nosetests 10.3 with Python 2.5 on Ubuntu Intrepid.

Google Code Info:
Issue #: 249
Author: alexander.lamaison@gmail.com
Created On: 2009-04-11T14:33:25.000Z
Closed On: 2009-04-11T15:00:26.000Z