Note that there are some explanatory texts on larger screens.

plurals
  1. POPython TDD directory structure
    primarykey
    data
    text
    <p>Is there a particular directory structure used for TDD in Python?</p> <p><strong><em>Tutorials talk about the content of the tests, but not where to place them</em></strong></p> <p>From poking around Python Koans, suspect its something like:</p> <pre><code>/project/main_program.py # This has main method, starts program /project/classes/&lt;many classes&gt;.py /project/main_test.py # This simply directs unittest onto tests, can use parameters fed to it to customise tests for environment /project/tests/&lt;many tests&gt;.py # to run tests, type "python -m unittest main_test.py" (into a terminal) # to run program, type "python main_program.py" </code></pre> <p>Am I doing this right? Is there a good guide which teaches the directory hierarchy for TDD? I heard that having mixed files of code and tests is bad.</p> <p>References:</p> <ul> <li><a href="https://stackoverflow.com/questions/1126173/are-there-any-good-online-tutorials-to-tdd-for-an-experienced-programmer-who-is">Are there any good online tutorials to TDD for an experienced programmer who is new to testing?</a> # A coding dojo? hmm... Perhaps I'll start a coding dojo website...</li> <li><a href="http://onlamp.com/pub/a/python/2004/12/02/tdd_pyunit.html" rel="nofollow noreferrer">http://onlamp.com/pub/a/python/2004/12/02/tdd_pyunit.html</a> #Shows mixed files</li> <li><a href="http://www.youtube.com/watch?v=sD6qzJNQEpE" rel="nofollow noreferrer">http://www.youtube.com/watch?v=sD6qzJNQEpE</a> #As great as pyTDDmon looks, I'd like to understand the basics first =) also thats a mixed file</li> <li><a href="http://www.slideshare.net/Skud/test-driven-development-tutorial" rel="nofollow noreferrer">http://www.slideshare.net/Skud/test-driven-development-tutorial</a> #explains "design test implement test repeat" only..</li> <li><a href="http://blog.cerris.com/category/django-tdd/" rel="nofollow noreferrer">http://blog.cerris.com/category/django-tdd/</a> #Still no help...</li> <li><a href="http://docs.python.org/library/unittest.html" rel="nofollow noreferrer">http://docs.python.org/library/unittest.html</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload