• Home
  • Raw
  • Download

Lines Matching full:what

209         s = Template('$who likes to eat a bag of $what worth $$100')
210 self.assertEqual(s.substitute(dict(who='tim', what='ham')),
216 s = Template('$who likes ${what} for ${meal}')
217 d = dict(who='tim', what='ham', meal='dinner')
220 dict(who='tim', what='ham'))
223 s = Template('$WHO likes ${WHAT} for ${MEAL}')
224 d = dict(WHO='tim', WHAT='ham', MEAL='dinner')
234 s = Template('$who likes to eat a bag of $$what worth $$100')
235 eq(s.substitute(dict(who='tim', what='ham')),
236 'tim likes to eat a bag of $what worth $100')
238 eq(s.substitute(dict(who='tim', what='ham')), 'tim likes $')
265 s = Template('$who likes ${what} for ${meal}')
266 eq(s.safe_substitute(dict(who='tim')), 'tim likes ${what} for ${meal}')
267 eq(s.safe_substitute(dict(what='ham')), '$who likes ham for ${meal}')
268 eq(s.safe_substitute(dict(what='ham', meal='dinner')),
270 eq(s.safe_substitute(dict(who='tim', what='ham')),
272 eq(s.safe_substitute(dict(who='tim', what='ham', meal='dinner')),
279 s = Template('$who likes ${what)')
297 m.bag.what = 'ham'
298 s = PathPattern('$bag.foo.who likes to eat a bag of $bag.what')
304 s = MyPattern('$wHO likes ${WHAT} for ${meal}')
305 d = dict(wHO='tim', WHAT='ham', meal='dinner', w='fred')
307 self.assertEqual(s.safe_substitute(d), 'fredHO likes ${WHAT} for dinner')
345 m.bag.what = 'ham'
346 s = MyPattern('@bag.foo.who likes to eat a bag of @bag.what')
357 s = BadPattern('@bag.foo.who likes to eat a bag of @bag.what')
416 s = Template('$who likes $what')
417 d = dict(who='t\xffm', what='f\xfe\fed')
422 s = Template('$who likes $what')
423 eq(s.substitute(who='tim', what='ham'), 'tim likes ham')
424 eq(s.substitute(dict(who='tim'), what='ham'), 'tim likes ham')
425 eq(s.substitute(dict(who='fred', what='kung pao'),
426 who='tim', what='ham'),
440 s = Template('$who likes $what')
441 eq(s.safe_substitute(who='tim', what='ham'), 'tim likes ham')
442 eq(s.safe_substitute(dict(who='tim'), what='ham'), 'tim likes ham')
443 eq(s.safe_substitute(dict(who='fred', what='kung pao'),
444 who='tim', what='ham'),
474 s = PieDelims('@who likes to eat a bag of @{what} worth $100')
475 self.assertEqual(s.substitute(dict(who='tim', what='ham')),