I'm using @test nodes for writing unit tests.
I'm using the 'run-unit-tests' command as I was suggested, so changes
that I make interactively to the code become visible without having to
restart leo.
The headlines of my test nodes usually follow the '@test <class method
name>' pattern.
Sometimes it happens that two distinct classes have the same method
name: something generic like next(), get(), and of course special
methods like __init__().
This is what I'm getting when a test for such a metod fails:
ERROR: @test join()
I see the test name, but as I said, the relevance of this debug info
is diminished if I have many nodes with the same name.
For example, consider this real traceback I'm getting:
--- cut here ---
Traceback (most recent call last):
File "/home/shadow/leo/leo-current/leo/core/leoTest.py", line 177,
in runTest
execfile(scriptFile,d)
File "/home/shadow/leo/leo-current/leo/test/scriptFile.py", line 12,
in <module>
self.assertRaises(AssertionError, pair2.join, pair1)
File "/usr/lib/python2.5/unittest.py", line 320, in failUnlessRaises
callableObj(*args, **kwargs)
File "/home/shadow/work/bzr/programming/permutations/
permutations.py", line 386, in join
if self.last.next().get() == pair.first.get():
AttributeError: 'NoneType' object has no attribute 'next'
--- cut here ---
"line 12, in <module>" tells me almost nothing about the location of
the failing test in the outline.
Ideally, I would expect to see the node that contains the failing test
to be selected in the outline after 'run-unit-tests' finishes.
I would also like to see the body pane activated and the cursor placed
on this line: " if self.last.next().get() == pair.first.get
():" (see the traceback above).
Please consider this a feature request if you think that my idea makes
sense.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---