[Zope3-dev] Unittest pleas
Marius Gedminas
mgedmin@codeworks.lt
Fri, 20 Dec 2002 20:04:15 +0200
On Fri, Dec 20, 2002 at 12:52:05PM -0500, Barry A. Warsaw wrote:
>
> For folks writing unittests, I have a couple of pleas:
>
> - please don't give test*() methods docstrings! Unittest prints the
> docstring instead of the name of the method being run and that makes
> it much harder to find the test from a verbose output.
>
> Commenting is fine of course, and I'm in the process of cleaning up
> a bunch of the Zope3 unittests, with checkins shortly.
>
> - please call your test methods "def test<something>" not "def
> check<something>". Consistency is good here, and "test" is the
> unittest default. When Jeremy and I do ZODB4 grand renaming, we'll
> fix those tests, but I don't plan to change any existing other Zope3
> test methods.
I'd like to add the following one:
- please call your test class "Test<Something>" instead of just "Test".
This way they'll be easy to locate quickly with tags.
Marius Gedminas
--
This sentence contradicts itself -- no actually it doesn't.
-- Douglas Hofstadter