nose-devs/nose — Issue #156: assert introspection not enabled by -d alone
Author: jpellerin
Created: 2011-12-14 16:02:06+00:00
State: open

I'm using nose 0.10.0 with Python 2.4.3.

The attached log of a shell session shows that 'nosetests -d' does not
enable assert introspection while 'nosetests -ds' does. As far as I know
that is not how it should behave.

cwg@lievens:~/tmp$ cat test_foo.py
def test_it():
a = 1
assert a == 2
cwg@lievens:~/tmp$ nosetests -d
ImportError: No module named profile
please install the python2.4-profiler package
F
======================================================================
FAIL: test_foo.test_it
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cwg/stow/python-nose/lib/python/nose/case.py", line 202, in
runTest
self.test(*self.arg)
File "/home/cwg/tmp/test_foo.py", line 3, in test_it
assert a == 2
AssertionError

----------------------------------------------------------------------
Ran 1 test in 0.020s

FAILED (failures=1)
cwg@lievens:~/tmp$ nosetests -ds
ImportError: No module named profile
please install the python2.4-profiler package
F
======================================================================
FAIL: test_foo.test_it
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cwg/stow/python-nose/lib/python/nose/case.py", line 202, in
runTest
self.test(*self.arg)
File "/home/cwg/tmp/test_foo.py", line 3, in test_it
assert a == 2
AssertionError:
1 = 1
>> assert 1 == 2

----------------------------------------------------------------------
Ran 1 test in 0.011s

FAILED (failures=1)

Google Code Info:
Issue #: 124
Author: c...@ilorentz.org
Created On: 2007-10-24T10:48:38.000Z
Closed On: 2007-10-24T15:15:38.000Z