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

Method test_vformat_recursion_limit

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

Source from the content-addressed store, hash-verified

207 self.assertRaises(ValueError, fmt.format, "{i}", 10, 20, i=100)
208
209 def test_vformat_recursion_limit(self):
210 fmt = string.Formatter()
211 args = ()
212 kwargs = dict(i=100)
213 with self.assertRaises(ValueError) as err:
214 fmt._vformat("{i}", args, kwargs, set(), -1)
215 self.assertIn("recursion", str(err.exception))
216
217
218# Template tests (formerly housed in test_pep292.py)

Callers

nothing calls this directly

Calls 5

_vformatMethod · 0.95
setFunction · 0.85
strFunction · 0.85
assertInMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected