The following forum message was posted by somik at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4701071:
How does Pydev pick up testsuites? I am unable to get my testsuite to be recognized
by the test runner.
class MyTest(unittest2.TestCase):
def test_something(self):
self.assertEquals(10,10)
class MyTestSuite(unittest2.TestSuite):
def suite(self):
return suite()
def suite():
#code to make a suite of tests
if __name__ == '__main__':
unittest2.TextTestRunner(verbosity=2).run(suite())
*************************************************************
If I run this as a Python program in Pydev (Run As -> Python Run), the suite
runs fine.
If I try running this in the PyUnit GUI (Run As -> Python unit-test), it does
not, as the suite() method is never called!
How do I ensure that the suite() method gets picked up by PyUnit? I tried looking
at the documentation but could not find anything. Thank you so much for helping.
|