[Twisted-Python] twisted.trial and test discovery

Drew Smathers drew.smathers at gmail.com
Wed Sep 19 09:44:34 MDT 2007


> I'm not sure I understand. Trial already does test discovery. "trial
> yourpackage" will find all the test cases in your package.

Yes, I know.  It will not pick up doctests defined in plain text files
(mymod.txt - like you see frequently in zope projects) or in doc
strings from my experiments.  Of course, this is just me being lazy  -
especially for doctests inside of modules where I can make a trivial
test_doc module to collect these:

from myproject import web, auth, i18n
__doctests__ = [ web, auth, i18n ]

-- 
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/  \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\  /\\\ \\
/ /\\\  /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
               d.p.s




More information about the Twisted-Python mailing list