vmalloc/infi.unittest — Issue #2: infi.unittest.parameters.iterate break 'nose --failed'
Author: grzn
Created: 2011-11-14 08:38:30+00:00
State: open

I'm running the following test case
```
from infi import unittest

class TestCase(unittest.TestCase):
@unittest.parameters.toggle("fail")
def test(self, fail):
if fail:
self.fail("Failing")
```
with nose --failed and I get an error on the 2nd run and forward:
```
$ nosetests --failed
F.
======================================================================
FAIL: TestCase.test(fail=True)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/py/lib/python2.7/site-packages/infi.unittest-0.0.12-py2.7.egg/infi/unittest/parameters.py", line 16, in new_func
return func(self, *call.args, **call.kwargs)
File "/tmp/test.py", line 7, in test
self.fail("Failing")
AssertionError: Failing
-------------------- >> begin captured logging << --------------------
root: DEBUG: Yielding (fail=True)
root: DEBUG: Yielding (fail=False)
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 2 tests in 0.002s

FAILED (failures=1)

$ nosetests --failed
E
======================================================================
ERROR: TestCase.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/py/lib/python2.7/site-packages/infi.unittest-0.0.12-py2.7.egg/infi/unittest/parameters.py", line 15, in new_func
call = self._spec_call_bindings[spec.id]
KeyError: 0

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
```