summaryrefslogtreecommitdiff
path: root/pystache/tests/spectesting.py
diff options
context:
space:
mode:
Diffstat (limited to 'pystache/tests/spectesting.py')
-rw-r--r--pystache/tests/spectesting.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pystache/tests/spectesting.py b/pystache/tests/spectesting.py
index cb9d316..d79d75c 100644
--- a/pystache/tests/spectesting.py
+++ b/pystache/tests/spectesting.py
@@ -61,6 +61,9 @@ def get_spec_tests(spec_test_dir):
Return a list of unittest.TestCase instances.
"""
+ # TODO: use logging module instead.
+ print "pystache: spec tests: using %s" % _get_parser_info()
+
cases = []
# Make this absolute for easier diagnosis in case of error.
@@ -90,6 +93,10 @@ def get_spec_tests(spec_test_dir):
return cases
+def _get_parser_info():
+ return "%s (version %s)" % (parser.__name__, parser.__version__)
+
+
def _read_spec_tests(path):
"""
Return a list of unittest.TestCase instances.
@@ -231,8 +238,9 @@ class SpecTestBase(unittest.TestCase, AssertStringMixin):
def escape(s):
return s.replace("%", "%%")
+ parser_info = _get_parser_info()
subs = [repr(test_name), description, os.path.abspath(file_path),
- template, repr(context), parser.__version__, str(parser)]
+ template, repr(context), parser_info]
subs = tuple([escape(sub) for sub in subs])
# We include the parsing module version info to help with troubleshooting
# yaml/json/simplejson issues.
@@ -246,7 +254,7 @@ class SpecTestBase(unittest.TestCase, AssertStringMixin):
%%s
- (using version %s of %s)
+ [using %s]
""" % subs
self.assertString(actual, expected, format=message)