# HG changeset patch # User Madhusudan.C.S # Date 1283858787 -19800 # Node ID 8888712bed39c8966e9cf657655abd7f6aa3441e # Parent e5d183dce98520a62c9ceb28c0357a2135b4e2b1 Added a paragraph about docstrings in the chapter. diff -r e5d183dce985 -r 8888712bed39 tdd/tdd.rst --- a/tdd/tdd.rst Tue Sep 07 16:56:09 2010 +0530 +++ b/tdd/tdd.rst Tue Sep 07 16:56:27 2010 +0530 @@ -525,13 +525,18 @@ if __name__ == '__main__': unittest.main() -Since we don't want to read this file into memory each time we run a -separate test method, we will read all the data in the file into -Python lists in the setUp method. The entire data file is kept in a -list called test_cases which happens to be an attribute of the -TestGCDFunction class. In the tearDown method of the class we -will delete this attribute to free up the memory and close the -opened file. +Please note that although we highly recommend to write a docstring for +all the classes, functions and modules we have not done so to keep +above code compact and we have left it as an exercise for the you to +add them. + +Coming back to tests themselves, since we don't want to read this file +into memory each time we run a separate test method, we will read all +the data in the file into Python lists in the setUp method. The entire +data file is kept in a list called test_cases which happens to be an +attribute of the TestGCDFunction class. In the tearDown method of the +class we will delete this attribute to free up the memory and close +the opened file. Our actual test code sits in the method which begins with the name **test_** as said earlier, the test_gcd method. Note that we import