def suite(): import unittest suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TwistedServerTestCase)) suite.addTest(unittest.makeSuite(TwistedGatewayTestCase)) suite.addTest(unittest.makeSuite(AMF0RequestProcessorTestCase)) suite.addTest(unittest.makeSuite(AMF3RequestProcessorTestCase)) return suite
def suite(): # don't use twisted.trial unittest here import unittest # @Reimport suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(InterfacesTestCase, 'test')) suite.addTest(unittest.makeSuite(ComponentizedTestCase, 'test')) suite.addTest(unittest.makeSuite(AdapterTestCase, 'test')) suite.addTest(unittest.makeSuite(TestMetaInterface, 'test')) suite.addTest(unittest.makeSuite(RegistrationTestCase, 'test')) suite.addTest(unittest.makeSuite(ProxyForInterfaceTests, 'test')) return suite
def testmain(suitelist): """ pass in alist of suites """ eng.ssdb.log = None # turn off db logging log.startLogging(sys.stdout,0) suites = [unittest.makeSuite(x) for x in suitelist] combined = unittest.TestSuite(suites) t = unittest.TextTestRunner() from twisted.internet import reactor,defer def done(arg): reactor.stop() d = defer.Deferred() d.addCallback(t.run) d.addBoth(done) reactor.callLater(0,d.callback,combined) reactor.run()
def GetTestSuite(): suite = runner.TestSuite(PokerDatabaseTestCase) suite.addTest(unittest.makeSuite(PokerDatabaseTestCase)) return suite
#!/usr/bin/env python from twisted.trial import unittest import test_json suite = unittest.makeSuite(test_json.JavascriptObjectNotationTestCase) def main(): t = unittest.TextTestRunner() t.run(suite) if __name__ == '__main__': main()