Lines Matching refs:Template

3 from string import Template
191 # Template tests (formerly housed in test_pep292.py)
209 s = Template('$who likes to eat a bag of $what worth $$100')
213 self.assertRaises(TypeError, Template.substitute)
216 s = Template('$who likes ${what} for ${meal}')
223 s = Template('$WHO likes ${WHAT} for ${MEAL}')
228 s = Template('$_wh0_ likes ${_w_h_a_t_} for ${mea1}')
234 s = Template('$who likes to eat a bag of $$what worth $$100')
237 s = Template('$who likes $$')
242 s = Template('%(foo)s $foo ${foo}')
249 s = Template('tim has eaten $count bags of ham today')
253 s = Template('tim has eaten ${count} bags of ham today')
258 s = Template('$who ate ${meal}')
265 s = Template('$who likes ${what} for ${meal}')
277 s = Template('$who likes $')
279 s = Template('$who likes ${what)')
281 s = Template('$who likes $100')
283 # Template.idpattern should match to only ASCII characters.
285 s = Template("$who likes $\u0131") # (DOTLESS I)
287 s = Template("$who likes $\u0130") # (LATIN CAPITAL LETTER I WITH DOT ABOVE)
291 class PathPattern(Template):
302 class MyPattern(Template):
311 # different when deriving from Template.
312 class MyPattern(Template):
322 # different when deriving from Template.
323 class MyPattern(Template):
334 class MyPattern(Template):
349 class BadPattern(Template):
362 class MyTemplate(Template):
379 class MyTemplate(Template):
401 class MyTemplate(Template):
416 s = Template('$who likes $what')
422 s = Template('$who likes $what')
428 s = Template('the mapping is $mapping')
434 s = Template('the self is $self')
440 s = Template('$who likes $what')
446 s = Template('the mapping is $mapping')
455 s = Template('the self is $self')
461 class AmpersandTemplate(Template):
472 class PieDelims(Template):
480 s = Template('$who likes to eat a bag of ${what} worth $$100')
483 s = Template('$who likes to eat a bag of ${what} worth $100')
488 class BadPattern(Template):
502 s = Template('$who likes to eat a bag of ${what} worth $$100')
507 s = Template('$who likes to eat a bag of ${what} worth $$100; ${who} likes to eat a bag of $what worth $$100')
512 s = Template('$who likes to eat a bag of ${what} worth $100')
518 class BadPattern(Template):