• Home
  • Raw
  • Download

Lines Matching full:what

241         s = Template('$who likes to eat a bag of $what worth $$100')
242 self.assertEqual(s.substitute(dict(who='tim', what='ham')),
248 s = Template('$who likes ${what} for ${meal}')
249 d = dict(who='tim', what='ham', meal='dinner')
252 dict(who='tim', what='ham'))
256 s = Template('$who likes to eat a bag of $$what worth $$100')
257 eq(s.substitute(dict(who='tim', what='ham')),
258 'tim likes to eat a bag of $what worth $100')
260 eq(s.substitute(dict(who='tim', what='ham')), 'tim likes $')
287 s = Template('$who likes ${what} for ${meal}')
288 eq(s.safe_substitute(dict(who='tim')), 'tim likes ${what} for ${meal}')
289 eq(s.safe_substitute(dict(what='ham')), '$who likes ham for ${meal}')
290 eq(s.safe_substitute(dict(what='ham', meal='dinner')),
292 eq(s.safe_substitute(dict(who='tim', what='ham')),
294 eq(s.safe_substitute(dict(who='tim', what='ham', meal='dinner')),
301 s = Template('$who likes ${what)')
313 m.bag.what = 'ham'
314 s = PathPattern('$bag.foo.who likes to eat a bag of $bag.what')
329 m.bag.what = 'ham'
330 s = MyPattern('@bag.foo.who likes to eat a bag of @bag.what')
341 s = BadPattern('@bag.foo.who likes to eat a bag of @bag.what')
380 s = Template('$who likes $what')
381 d = dict(who=u't\xffm', what=u'f\xfe\fed')
386 s = Template('$who likes $what')
387 eq(s.substitute(who='tim', what='ham'), 'tim likes ham')
388 eq(s.substitute(dict(who='tim'), what='ham'), 'tim likes ham')
389 eq(s.substitute(dict(who='fred', what='kung pao'),
390 who='tim', what='ham'),
404 s = Template('$who likes $what')
405 eq(s.safe_substitute(who='tim', what='ham'), 'tim likes ham')
406 eq(s.safe_substitute(dict(who='tim'), what='ham'), 'tim likes ham')
407 eq(s.safe_substitute(dict(who='fred', what='kung pao'),
408 who='tim', what='ham'),
438 s = PieDelims('@who likes to eat a bag of @{what} worth $100')
439 self.assertEqual(s.substitute(dict(who='tim', what='ham')),