summaryrefslogtreecommitdiff
path: root/pystache/tests
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-04-28 10:26:39 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-04-28 10:26:39 -0700
commit91a2f860b14e481357972c98c4997c18ef37d7d5 (patch)
tree974ebfb8ef87777b35f63b87eb0d51d68be32e13 /pystache/tests
parent8929d6c36478e2f5667d28551ca7db6e286e741a (diff)
downloadpystache-91a2f860b14e481357972c98c4997c18ef37d7d5.tar.gz
Stubbed out tests/test_parser.py.
Diffstat (limited to 'pystache/tests')
-rw-r--r--pystache/tests/test_parser.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/pystache/tests/test_parser.py b/pystache/tests/test_parser.py
new file mode 100644
index 0000000..c7bdafa
--- /dev/null
+++ b/pystache/tests/test_parser.py
@@ -0,0 +1,26 @@
+# coding: utf-8
+
+"""
+Unit tests of parser.py.
+
+"""
+
+import unittest
+
+from pystache.parser import _compile_template_re as make_re
+
+
+class RegularExpressionTestCase(unittest.TestCase):
+
+ """Tests the regular expression returned by _compile_template_re()."""
+
+ def test_re(self):
+ """
+ Test getting a key from a dictionary.
+
+ """
+ re = make_re()
+ match = re.search("{{test}}")
+
+ self.assertEqual(match.start(), 0)
+