summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-02-07 12:16:12 (GMT)
committerGeorg Brandl <georg@python.org>2010-02-07 12:16:12 (GMT)
commit7ae6018788ce3c5bafc5bde974ebd425adcf410c (patch)
tree8a64d15cd6f5cd29931da4546abae1c2f0000169
parentab3f5cbabd1a8ed8ac3b0e595f31826d5f320a6a (diff)
downloadcpython-7ae6018788ce3c5bafc5bde974ebd425adcf410c.zip
cpython-7ae6018788ce3c5bafc5bde974ebd425adcf410c.tar.gz
cpython-7ae6018788ce3c5bafc5bde974ebd425adcf410c.tar.bz2
Fix another duplicated test method.
-rw-r--r--Lib/test/test_pep292.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Lib/test/test_pep292.py b/Lib/test/test_pep292.py
index d1100ea..cb8a244 100644
--- a/Lib/test/test_pep292.py
+++ b/Lib/test/test_pep292.py
@@ -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