From 5a47ea6dd89acb51fee1e433435ccc28858e51e4 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Fri, 20 Apr 2012 13:18:03 -0700 Subject: Added TODO notes to pystache/tests/main.py. --- pystache/tests/main.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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): """ -- cgit v1.2.1