Unittest - adding a doctest suite to unittest.main

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Oct 15 00:15:53 CEST 2008

Duncan Booth <duncan.booth at invalid.invalid> writes:

> Create a function named test_suite which creates a test suite
> containing all your tests including the doctests. Pass that to main
> as the defaultTest argument.

Better to name it ‘suite’, so that its name doesn't match the default
search for individual test functions.

 \       “Remember: every member of your ‘target audience’ also owns a |
  `\   broadcasting station. These ‘targets’ can shoot back.” —Michael |
_o__)               Rathbun to advertisers, news.admin.net-abuse.email |
Ben Finney

More information about the Python-list mailing list