parses out and reruns tests from an interactive session log that is pasted into module' docstrings the logs give test calls and expected resultsdoctest essentially reruns the interactive session see the python library manualthe pypi websiteand your favorite web search engine for additional testing toolkits in both python itself and the third-party domain for automated testing of python command-line scripts that run as independent programs and tap into standard script execution contextthoughour tester does the job because the test driver is fully independent of the scripts it testswe can drop in new test cases without having to update the driver' code and because it is written in pythonit' quick and easy to change as our testing needs evolve as we'll see again in the next sectionthis "scriptabilitythat python provides can be decided advantage for real tasks testing gone badonce we learn about sending email from python scripts in you might also want to augment this script to automatically send out email when regularly run tests fail ( when run from cron job on unixthat wayyou don' even need to remember to check results of courseyou could go further still one company worked for added sound effects to compiler test scriptsyou got an audible round of applause if no regressions were found and an entirely different noise otherwise (see playfile py at the end of this for hints another company in my development past ran nightly test script that automatically isolated the source code file check-in that triggered test regression and sent nasty email to the guilty party (and his or her supervisornobody expects the spanish inquisitioncopying directory trees my cd writer sometimes does weird things in factcopies of files with odd names can be totally botched on the cdeven though other files show up in one piece that' not necessarily showstopperif just few files are trashed in big cd backup copyi can always copy the offending files elsewhere one at time unfortunatelydrag-and-drop copies on some versions of windows don' play nicely with such cdthe copy operation stops and exits the moment the first bad file is encountered you get only as many files as were copied up to the errorbut no more in factthis is not limited to cd copies 've run into similar problems when trying to back up my laptop' hard drive to another drive--the drag-and-drop copy stops with an error as soon as it reaches file with name that is too long or odd to copy (common complete system programs