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

Method test_frozensets

Lib/test/test_gdb/test_pretty_print.py:187–196  ·  view source on GitHub ↗

Verify the pretty-printing of frozensets

(self)

Source from the content-addressed store, hash-verified

185
186 @support.requires_resource('cpu')
187 def test_frozensets(self):
188 'Verify the pretty-printing of frozensets'
189 if GDB_VERSION < (7, 3):
190 self.skipTest("pretty-printing of frozensets needs gdb 7.3 or later")
191 self.assertGdbRepr(frozenset(), "frozenset()")
192 self.assertGdbRepr(frozenset(['a']), "frozenset({'a'})")
193 # PYTHONHASHSEED is need to get the exact frozenset item order
194 if not sys.flags.ignore_environment:
195 self.assertGdbRepr(frozenset(['a', 'b']), "frozenset({'a', 'b'})")
196 self.assertGdbRepr(frozenset([4, 5, 6]), "frozenset({4, 5, 6})")
197
198 def test_exceptions(self):
199 # Test a RuntimeError

Callers

nothing calls this directly

Calls 2

assertGdbReprMethod · 0.95
skipTestMethod · 0.80

Tested by

no test coverage detected