MCPcopy Index your code
hub / github.com/python/cpython / test_tupleargs

Method test_tupleargs

Lib/test/test_string/test_string.py:283–288  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

281 eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
282
283 def test_tupleargs(self):
284 eq = self.assertEqual
285 s = Template('$who ate ${meal}')
286 d = dict(who=('tim', 'fred'), meal=('ham', 'kung pao'))
287 eq(s.substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
288 eq(s.safe_substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
289
290 def test_SafeTemplate(self):
291 eq = self.assertEqual

Callers

nothing calls this directly

Calls 4

substituteMethod · 0.95
safe_substituteMethod · 0.95
TemplateClass · 0.90
eqFunction · 0.85

Tested by

no test coverage detected