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

Ben Finney ben+python at benfinney.id.au
Fri Dec 5 22:11:46 PST 2008


"Daryl Spitzer" <daryl.spitzer at gmail.com> writes:

> To follow up, I ended up going with:
> 
> - all my unit tests in the 'tests' subdirectory
> - integration tests in an 'integration' subdirectory in 'tests' (WITH
> a __init__.py)
> 
> I run all tests by simply running `nosetests`.  I run unit tests only
> with `nosetests --exclude=integration`.  I run integration tests only
> with `nosetests --where=tests/integration`.

Sounds like a simple, workable system. Thanks for reporting back!

-- 
 \         “Pinky, are you pondering what I'm pondering?” “I think so, |
  `\    Brain, but if we get Sam Spade, we'll never have any puppies.” |
_o__)                                           —_Pinky and The Brain_ |
Ben Finney




More information about the testing-in-python mailing list