[TIP] Where to put unit tests? (What to name subdirectory?)

Daryl Spitzer daryl.spitzer at gmail.com
Wed Nov 12 12:41:14 PST 2008


I apologize if this is a FAQ.  I didn't find the answer (or question)
in a quick search.

Is there a convention for where to put unit tests?

I favor putting them in a subdirectory named "UnitTests" (following
Michael Foord's example in the Mock sources).  That way I can easily
separate the unit tests from integration tests or system tests.

But a colleague states that the python stdlib's tests are in a
subdirectory called "tests".  Should I consider that a convention and
stick with it (in spite of its disadvantages)?

--
Daryl



More information about the testing-in-python mailing list