MCPcopy Create free account
hub / github.com/python/cpython / test_dicts

Method test_dicts

Lib/test/test_gdb/test_pretty_print.py:80–92  ·  view source on GitHub ↗

Verify the pretty-printing of dictionaries

(self)

Source from the content-addressed store, hash-verified

78 self.assertGdbRepr(None)
79
80 def test_dicts(self):
81 'Verify the pretty-printing of dictionaries'
82 self.assertGdbRepr({})
83 self.assertGdbRepr({'foo': 'bar'}, "{'foo': 'bar'}")
84 # Python preserves insertion order since 3.6
85 self.assertGdbRepr({'foo': 'bar', 'douglas': 42},
86 "{'foo': 'bar', 'douglas': 42}")
87
88 # frozendict
89 self.assertGdbRepr(frozendict(),
90 "frozendict({})")
91 self.assertGdbRepr(frozendict({'foo': 'bar', 'douglas': 42}),
92 "frozendict({'foo': 'bar', 'douglas': 42})")
93
94 def test_lists(self):
95 'Verify the pretty-printing of lists'

Callers

nothing calls this directly

Calls 2

assertGdbReprMethod · 0.95
frozendictClass · 0.85

Tested by

no test coverage detected