[TIP] Some simple examples for testing stuff
C. Titus Brown
ctb at msu.edu
Mon Mar 8 22:12:11 PST 2010
Hi all,
I sat down and went through the various e-mails from the long testing/packaging
thread, and implemented some of the mechanisms described therein; I just need
code to get a feeling for things, ya know? ;)
Anyway, I'd be interested in comments, corrections, and thoughts on the
following.
--
Everything is under
http://github.com/ctb/SomePackage/tree/master/examples/
--
An example of using 'discover':
http://github.com/ctb/SomePackage/tree/master/examples/discover/
--
Using setuptools' 'test_suite' argument:
http://github.com/ctb/SomePackage/tree/master/examples/setuptools-test_suite/
--
Using setuptools' 'test_loader' argument:
http://github.com/ctb/SomePackage/tree/master/examples/setuptools-test_loader/
--
Building a fake TestSuite-like object:
http://github.com/ctb/SomePackage/tree/master/examples/fake_suite/
--
I'm particularly intrigued by the idea of coming up with a standard that
specifies some API-level compatibility with the discover protocol as well as
unittest behavior, e.g.
python -m unittest <something>
but I didn't get a chance to figure this out tonight. Code welcome,
esp in the context of the last (fake_suite) example.
cheers,
--titus
--
C. Titus Brown, ctb at msu.edu
More information about the testing-in-python
mailing list