diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-21 08:43:17 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-21 08:43:17 -0700 |
commit | 82442c3300ce47042bd8364fe05a6ab512c4e9a4 (patch) | |
tree | 2dfdbe9c82e19cd34db3e5bdf14a77752334bcaf /pystache | |
parent | fb12f8a6528357e6a1be7fd550040c2f9b213b2c (diff) | |
download | pystache-82442c3300ce47042bd8364fe05a6ab512c4e9a4.tar.gz |
Renamed get_module_doctests() to get_doctests().
Diffstat (limited to 'pystache')
-rw-r--r-- | pystache/tests/doctesting.py | 11 | ||||
-rw-r--r-- | pystache/tests/main.py | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/pystache/tests/doctesting.py b/pystache/tests/doctesting.py index 04f1c87..3cc06c1 100644 --- a/pystache/tests/doctesting.py +++ b/pystache/tests/doctesting.py @@ -17,9 +17,14 @@ from pystache.tests.common import PACKAGE_DIR, TEXT_DOCTEST_PATHS # http://docs.python.org/library/doctest.html#unittest-api # -def get_module_doctests(project_dir): +def get_doctests(text_file_dir): """ - Return a list of TestSuite instances for all doctests in the pacakqge. + Return a list of TestSuite instances for all doctests in the project. + + Arguments: + + text_file_dir: the directory in which to search for all text files + (i.e. non-module files) containing doctests. """ suites = [] @@ -29,7 +34,7 @@ def get_module_doctests(project_dir): # # http://docs.python.org/library/doctest.html#doctest.DocFileSuite # - paths = [os.path.normpath(os.path.join(project_dir, path)) for path in TEXT_DOCTEST_PATHS] + paths = [os.path.normpath(os.path.join(text_file_dir, path)) for path in TEXT_DOCTEST_PATHS] for path in paths: suite = doctest.DocFileSuite(path, module_relative=False) suites.append(suite) diff --git a/pystache/tests/main.py b/pystache/tests/main.py index 799b7a6..d95c249 100644 --- a/pystache/tests/main.py +++ b/pystache/tests/main.py @@ -12,7 +12,7 @@ import sys from unittest import TestProgram from pystache.tests.common import PACKAGE_DIR, PROJECT_DIR -from pystache.tests.doctesting import get_module_doctests +from pystache.tests.doctesting import get_doctests UNITTEST_FILE_PREFIX = "test_" @@ -145,7 +145,7 @@ class _PystacheTestProgram(TestProgram): """ def runTests(self): - doctest_suites = get_module_doctests(self._project_dir) + doctest_suites = get_doctests(self._project_dir) # self.test is a unittest.TestSuite instance: # http://docs.python.org/library/unittest.html#unittest.TestSuite self.test.addTests(doctest_suites) |