Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
60a6c396
Commit
60a6c396
authored
Apr 20, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed SOURCE_DIR to PACKAGE_DIR.
parent
67d77628
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
+12
-17
pystache/tests/common.py
+6
-3
pystache/tests/doctesting.py
+6
-9
pystache/tests/test_doctests.py
+0
-5
No files found.
pystache/tests/common.py
View file @
60a6c396
...
...
@@ -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
):
...
...
pystache/tests/doctesting.py
View file @
60a6c396
...
...
@@ -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
(
SOURC
E_DIR
)
modules
=
_get_module_doctests
(
PACKAG
E_DIR
)
for
module
in
modules
:
suite
=
doctest
.
DocTestSuite
(
module
)
suites
.
append
(
suite
)
...
...
pystache/tests/test_doctests.py
View file @
60a6c396
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment