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

Method test_repr_recursive_values

Lib/test/test_ordered_dict.py:390–402  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

388 "OrderedDict({'a': None, 'b': None, 'c': None, 'x': ...})")
389
390 def test_repr_recursive_values(self):
391 OrderedDict = self.OrderedDict
392 od = OrderedDict()
393 od[42] = od.values()
394 r = repr(od)
395 # Cannot perform a stronger test, as the contents of the repr
396 # are implementation-dependent. All we can say is that we
397 # want a str result, not an exception of any sort.
398 self.assertIsInstance(r, str)
399 od[42] = od.items()
400 r = repr(od)
401 # Again.
402 self.assertIsInstance(r, str)
403
404 def test_setdefault(self):
405 OrderedDict = self.OrderedDict

Callers

nothing calls this directly

Calls 4

valuesMethod · 0.95
itemsMethod · 0.95
assertIsInstanceMethod · 0.80
OrderedDictClass · 0.70

Tested by

no test coverage detected