[Twisted-Python] Trial Test Runner

Markus Schiltknecht markus at bluegap.ch
Wed Nov 15 10:09:01 MST 2006


Hi,

I'm having a hard time writing a test suite using trial. What's the best 
documentation available? I've the API Reference as well as the sources 
at hand, but...

For example I've tried this:

#!/usr/bin/python
# -*- test-case-name: eUnit.test.test_sample -*-

from twisted.trial import unittest, runner, reporter

class Test(unittest.TestCase):

	def testSample(self):
		print "hallo welt"


if __name__ == "__main__":
	runner.TrialRunner(reporter.TextReporter).run(Test)

It's failing with:
TypeError: unbound method countTestCases() must be called with Test 
instance as first argument (got nothing instead)

Some more documentation (an introduction or tutorial or some such) would 
be very welcome and helpful.

Regards

Markus




More information about the Twisted-Python mailing list