]> granicus.if.org Git - python/commitdiff
Fix another duplicated test method.
authorGeorg Brandl <georg@python.org>
Sun, 7 Feb 2010 12:16:12 +0000 (12:16 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 7 Feb 2010 12:16:12 +0000 (12:16 +0000)
Lib/test/test_pep292.py

index d1100ea8f62f95fa29731c92f8daaa4caebaceb2..cb8a244dc0e0ece4646623085df7b7800ed1b87b 100644 (file)
@@ -86,13 +86,6 @@ class TestTemplate(unittest.TestCase):
         s = Template('$who likes $100')
         raises(ValueError, s.substitute, dict(who='tim'))
 
-    def test_delimiter_override(self):
-        class PieDelims(Template):
-            delimiter = '@'
-        s = PieDelims('@who likes to eat a bag of @{what} worth $100')
-        self.assertEqual(s.substitute(dict(who='tim', what='ham')),
-                         'tim likes to eat a bag of ham worth $100')
-
     def test_idpattern_override(self):
         class PathPattern(Template):
             idpattern = r'[_a-z][._a-z0-9]*'
@@ -183,6 +176,12 @@ class TestTemplate(unittest.TestCase):
         raises(ValueError, s.substitute, dict(gift='bud', who='you'))
         eq(s.safe_substitute(), 'this &gift is for &{who} &')
 
+        class PieDelims(Template):
+            delimiter = '@'
+        s = PieDelims('@who likes to eat a bag of @{what} worth $100')
+        self.assertEqual(s.substitute(dict(who='tim', what='ham')),
+                         'tim likes to eat a bag of ham worth $100')
+
 
 def test_main():
     from test import test_support