summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pystache/tests/main.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pystache/tests/main.py b/pystache/tests/main.py
index 68b41a1..b9bc58f 100644
--- a/pystache/tests/main.py
+++ b/pystache/tests/main.py
@@ -16,6 +16,21 @@ UNITTEST_FILE_PREFIX = "test_"
# TODO: enhance this to work with doctests (instead of using the load_tests
# protocol), etc.
+
+# Notes for TODO:
+#
+# The function unittest.main() is an alias for unittest.TestProgram's
+# constructor. The constructor calls self.runTests() as its final step, which
+# expects self.test to be set. The constructor sets the self.test attribute
+# by calling one of self.testLoader's "loadTests" methods. These methods
+# return a unittest.TestSuite instance. Thus, self.test is set to a TestSuite
+# instance prior to calling runTests().
+#
+# Our strategy is to subclass unittest.TestProgram and override its runTests()
+# method. Our implementation of runTests() will add to self.test additional
+# TestCase or TestSuite instances (e.g. doctests and spec tests), and then
+# call the base class's runTests().
+
class Tester(object):
"""