def setUp(self): from twisted.trial.test import sample self.test = sample.FooTest('test_foo') self.stream = StringIO.StringIO() self.result = reporter.TreeReporter(self.stream) self.result._colorizer = MockColorizer(self.stream) self.log = self.result._colorizer.log
def test_getDescription(self): result = reporter.TreeReporter(self.stream) output = result.getDescription(self.test) self.failUnlessEqual(output, "test_foo")
def test_treeReporter(self): result = reporter.TreeReporter(self.stream) result.startTest(self.test) output = self.stream.getvalue() output = output.splitlines()[-1].strip() self.failUnlessEqual(output, result.getDescription(self.test) + ' ...')
def test_treeReporterWithDocstrings(self): """A docstring""" result = reporter.TreeReporter(self.stream) self.assertEqual(result.getDescription(self), 'test_treeReporterWithDocstrings')
'''Utils''' from chat.test import test_parse_url from chat.test import test_email from chat.test import test_stress from chat.test import test_utils # from chat.test import test_protocol '''Text Protocol''' from chat.test.text_protocol import test_user from chat.test.text_protocol import test_channel from chat.test.text_protocol import test_channel_mode from chat.test.text_protocol import test_channel_ban from chat.test.text_protocol import test_channel_search from chat.test.text_protocol import test_post if __name__ == '__main__': results = reporter.TreeReporter() suite = unittest.TestSuite() tests = [ # test_email, # test_protocol, # test_channel_search # test_post # test_parse_url, # test_stress, # test_utils, test_user # test_channel_mode, # test_channel, # test_channel_ban ]