[wingide-users] Unittest veteran needs trivial example to debug test visibility.

Brad Olson bolson at ubs-icap.org
Fri Sep 24 08:45:58 MDT 2010


John, I got it working with a simple example, a brand new project that just
runs a few simple unit tests. Nice, simple unit test GUI, BTW!

But in a more complex project package, when I try "Run Tests in Current
File" on this file:
_____________________________________________
#coding: utf-8
"""tests.py FOR NOW, THIS DOES NOTHING. JUST TESTING THE WINGIDE TEST
RUNNER."""
import unittest
class TestTest( unittest.TestCase):
    def setUp(self):
        self.name = "stuff"
    def testSetup(self):
        self.assertEqual( "stuff", self.name)
    def testFailure(self):
        self.assertEqual( "stuffy", self.name)

#unittest.main()
_____________________________________________

...WingIDE's testing tool box shows "tests.py" doesn't seem to find the
tests. The status bar indicates tests starting then finished, then
 "tests.py" appears in the tool box with a blue question mark still by it
and no children.

Details: If I uncomment unittest.main() and debug, the tests run as
expected, with one failing. Removing the test file from the tool box and
re-running doesn't seem to help. My project default test framework is set to
"Unittest."

Could it be some package __init__.py or some project setting if interfering
with test discovery? Willing to do a little sleuthing here if you have any
ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20100924/74dcb238/attachment.html


More information about the wingide-users mailing list