[Tutor] Where should unit test files go in a project directory structure and some related questions?
boB Stepp
robertvstepp at gmail.com
Sun Aug 16 06:48:46 CEST 2015
On Sat, Aug 15, 2015 at 9:10 PM, boB Stepp <robertvstepp at gmail.com> wrote:
> Right now I am trying to figure out how to arrange my unit test
> file(s). My initial thoughts are to have a single test directory with
> separate subdirectories corresponding to each folder which has source
> code. Is this a good way to do things?
Apparently, based on tonight's searching, there is a large diversity
of opinion on where to put one's tests!
I did find one good web article, "Python Project Howto", at
http://infinitemonkeycorps.net/docs/pph/
that seems really good. It is oriented on how to prep your project
for open source distribution and is quite detailed. On the question I
am interested in, the author proposes this project structure:
googlemaps/ # Project Hosting
.svn/ # Version Control
googlemaps/ # Quality Code
googlemaps.py
test/ # Unit Testing
test_googlemaps.py
doc/ # Documentation
index.rst
html/
index.html
README.txt
LICENSE.txt # Licensing
setup.py # Packaging
MANIFEST.in
I think that this article would make a good read for anyone in a
similar learning situation as mine.
Cheers!
boB
More information about the Tutor
mailing list