summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhusudan.C.S2010-09-07 16:56:27 +0530
committerMadhusudan.C.S2010-09-07 16:56:27 +0530
commitf96d3b3d2a8e861e2e034b400813ada4aa91f530 (patch)
treeffaf032678cada1883569921750bff1517724f4d
parent14e6b9832914df2c0b51de719e809310076d93c7 (diff)
downloadsees-f96d3b3d2a8e861e2e034b400813ada4aa91f530.tar.gz
sees-f96d3b3d2a8e861e2e034b400813ada4aa91f530.tar.bz2
sees-f96d3b3d2a8e861e2e034b400813ada4aa91f530.zip
Added a paragraph about docstrings in the chapter.
-rw-r--r--tdd/tdd.rst19
1 files changed, 12 insertions, 7 deletions
diff --git a/tdd/tdd.rst b/tdd/tdd.rst
index c987fb4..a1f97c2 100644
--- a/tdd/tdd.rst
+++ b/tdd/tdd.rst
@@ -525,13 +525,18 @@ code within test_gcd.py module. Our test code looks like this::
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