Commit 60a6c396 by Chris Jerdonek

Renamed SOURCE_DIR to PACKAGE_DIR.

parent 67d77628
......@@ -17,10 +17,13 @@ _TESTS_DIR = os.path.dirname(pystache.tests.__file__)
DATA_DIR = os.path.join(_TESTS_DIR, 'data') # i.e. 'pystache/tests/data'.
EXAMPLES_DIR = os.path.dirname(examples.__file__)
# TODO: change SOURCE_DIR to PACKAGE_DIR.
SOURCE_DIR = os.path.dirname(pystache.__file__)
PROJECT_DIR = os.path.join(SOURCE_DIR, '..')
PACKAGE_DIR = os.path.dirname(pystache.__file__)
PROJECT_DIR = os.path.join(PACKAGE_DIR, '..')
SPEC_TEST_DIR = os.path.join(PROJECT_DIR, 'ext', 'spec', 'specs')
# TEXT_DOCTEST_PATHS: the paths to text files (i.e. non-module files)
# containing doctests. These paths should be OS-specific and relative
# to the project directory.
TEXT_DOCTEST_PATHS = ['README.rst']
def html_escape(u):
......
......@@ -10,15 +10,12 @@ import pkgutil
import doctest
import traceback
from pystache.tests.common import PACKAGE_DIR, PROJECT_DIR, TEXT_DOCTEST_PATHS
from pystache.tests.common import PROJECT_DIR, SOURCE_DIR
# The paths to text files (i.e. non-module files) containing doctests.
# Paths should be OS-specific and relative to the project directory.
TEXT_DOCTEST_PATHS = ['README.rst']
# This module follows the guidance documented here:
#
# http://docs.python.org/library/doctest.html#unittest-api
#
def get_module_doctests():
"""
......@@ -39,7 +36,7 @@ def get_module_doctests():
suite = doctest.DocFileSuite(path, module_relative=False)
suites.append(suite)
modules = _get_module_doctests(SOURCE_DIR)
modules = _get_module_doctests(PACKAGE_DIR)
for module in modules:
suite = doctest.DocTestSuite(module)
suites.append(suite)
......
......@@ -5,11 +5,6 @@ Creates unittest.TestSuite instances for the doctests in the project.
"""
# This module follows the guidance documented here:
#
# http://docs.python.org/library/doctest.html#unittest-api
#
from pystache.tests.doctesting import get_module_doctests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment