summaryrefslogtreecommitdiff
path: root/pystache/tests/common.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-10-16 23:51:24 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-10-16 23:51:24 -0700
commit6f0a3612c240940e079e06f1c16c65a6c1b54a7d (patch)
treec35d2db1601ca603829e2306d2236a2a29313bee /pystache/tests/common.py
parentf14e42de9b3b11763cf7ee745de58d89816874f0 (diff)
downloadpystache-6f0a3612c240940e079e06f1c16c65a6c1b54a7d.tar.gz
Address issue #122: add Renderer.render_name().
This commit adds a Renderer.render_name() method that lets one render a template given its name.
Diffstat (limited to 'pystache/tests/common.py')
-rw-r--r--pystache/tests/common.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pystache/tests/common.py b/pystache/tests/common.py
index 307a2be..99be4c8 100644
--- a/pystache/tests/common.py
+++ b/pystache/tests/common.py
@@ -43,7 +43,10 @@ def html_escape(u):
return u.replace("'", '&#x27;')
-def get_data_path(file_name):
+def get_data_path(file_name=None):
+ """Return the path to a file in the test data directory."""
+ if file_name is None:
+ file_name = ""
return os.path.join(DATA_DIR, file_name)
@@ -139,8 +142,7 @@ class AssertStringMixin:
format = "%s"
# Show both friendly and literal versions.
- details = """String mismatch: %%s\
-
+ details = """String mismatch: %%s
Expected: \"""%s\"""
Actual: \"""%s\"""