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

Method test_recursive_repr

Lib/test/test_dictviews.py:267–278  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

265 {}.items() - 1
266
267 def test_recursive_repr(self):
268 d = {}
269 d[42] = d.values()
270 r = repr(d)
271 # Cannot perform a stronger test, as the contents of the repr
272 # are implementation-dependent. All we can say is that we
273 # want a str result, not an exception of any sort.
274 self.assertIsInstance(r, str)
275 d[42] = d.items()
276 r = repr(d)
277 # Again.
278 self.assertIsInstance(r, str)
279
280 @skip_wasi_stack_overflow()
281 @skip_emscripten_stack_overflow()

Callers

nothing calls this directly

Calls 3

assertIsInstanceMethod · 0.80
valuesMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected