[PyKDE] QtUnittest and Eric...
Detlev Offenbach
detlev at die-offenbachs.de
Sun Apr 27 10:59:00 BST 2003
Am Samstag, 26. April 2003 23:42 schrieb Timothy Grant:
> I have a test module that works very well using "unittest.main()"
>
> I recently decided to attempt to use a graphical debugger, so
> installed Eric3, but I cannot figure out what I have to do to get the
> GUI unittest to work.
>
> It always tells me that the module has no attribute "suite" so I
> created a suite function...
>
> def test_suite():
> suite = unittest.TestSuite()
> suite.addTest(
> TableInstantiationTestCase("test_Table_Object_Instantiates"))
> return suite
>
> It still doesn't like it. So what's the trick? I'm sure it's something
> stupidly simple, but the combinations I've tried so far haven't
> worked.
>
Just rename your "test_suite()" function "suite()" and it should work.
def suite():
s = unittest.TestSuite()
s.addTest(
TableInstantiationTestCase("test_Table_Object_Instantiates"))
return s
Regards,
Detlev
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the PyQt
mailing list