Terry Carroll <carr...@tjc.com> writes: > Is anyone aware of any good tutorials on testing one's Python code? > > Any resources would be helpful. I am aware of the docs on unittest, > but I'm looking for a more tutorial approach.
The book Dive Into Python (available both for Python 2 and Python 3) <URL:http://www.diveintopython.net/> has a good “dive in”, tutorial style, to unit testing a complete program. This guide has good “dos and don'ts” for testing while you code <URL:http://docs.python-guide.org/en/latest/writing/tests/>. Test behaviour of the whole program, too, with behavioural tests <URL:https://semaphoreci.com/community/tutorials/getting-started-with-behavior-testing-in-python-with-behave>. Automate all of this by writing build scripts which run *all* the tests with a single command. That's something you should already have in place, but Fabric is a place to start, or you may be more comfortable with Make. -- \ “The problem with television is that the people must sit and | `\ keep their eyes glued on a screen: the average American family | _o__) hasn't time for it.” —_The New York Times_, 1939 | Ben Finney _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor