diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-10-16 23:51:24 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-10-16 23:51:24 -0700 |
commit | 6f0a3612c240940e079e06f1c16c65a6c1b54a7d (patch) | |
tree | c35d2db1601ca603829e2306d2236a2a29313bee /pystache/tests/common.py | |
parent | f14e42de9b3b11763cf7ee745de58d89816874f0 (diff) | |
download | pystache-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.py | 8 |
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("'", ''') -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\""" |