Wed Oct 4 16:21:27 2006
Ticket #95 (Closed: fixed)
evaluating asserts stops working when there is a two-line docstring
| Priority: | normal | Reporter: | cito@online.de |
|---|---|---|---|
| Severity: | normal | Assigned to: | jpellerin |
| Component: | nose | Status: | closed |
| Version: | 0.9 | Resolution: | fixed |
| Milestone: | 0.9.2 | Keywords: |
Description by cito@online.de:
This is a problem with nose version 0.9.0.
When I run the following test with nosetests -d option,
def test_integers():
a = 2 assert a == 4
I get this expected result, the variable a is expanded:
...
assert a == 4 AssertionError? 2 = 2 >> assert 2 == 4
However, when I add a two-line docstring like that:
def test_integers():
"""docstring line 1 docstring line 2 """ a = 2 assert a == 4
then, instead of the variable expansion, the last line of the docstring is displayed:
...
assert a == 4 AssertionError? docstring line 2
Changelog
Wed Oct 4 16:23:26 2006: Modified by cito@online.de
Thu Oct 12 13:57:29 2006: Modified by jpellerin
- milestone set to 0.9.2
- status changed from new to assigned
Wed Dec 6 17:35:21 2006: Modified by jpellerin
- resolution set to fixed
- status changed from assigned to closed
Fixed in [140]

Again, with proper formatting:
When I run the following test with nosetests -d option,
def test_integers(): a = 2 assert a == 4I get this expected result, the variable a is expanded:
... assert a == 4 AssertionError 2 = 2 >> assert 2 == 4However, when I add a two-line docstring like that:
def test_integers(): """docstring line 1 docstring line 2 """ a = 2 assert a == 4then, instead of the variable expansion, the last line of the docstring is displayed:
... assert a == 4 AssertionError docstring line 2