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

Method test_unreadable

Lib/test/test_pprint.py:234–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 "expected isreadable for %r" % (safe,))
233
234 def test_unreadable(self):
235 # Not recursive but not readable anyway
236 pp = pprint.PrettyPrinter()
237 for unreadable in object(), int, pprint, pprint.isrecursive:
238 # module-level convenience functions
239 self.assertFalse(pprint.isrecursive(unreadable),
240 "expected not isrecursive for %r" % (unreadable,))
241 self.assertFalse(pprint.isreadable(unreadable),
242 "expected not isreadable for %r" % (unreadable,))
243 # PrettyPrinter methods
244 self.assertFalse(pp.isrecursive(unreadable),
245 "expected not isrecursive for %r" % (unreadable,))
246 self.assertFalse(pp.isreadable(unreadable),
247 "expected not isreadable for %r" % (unreadable,))
248
249 def test_same_as_repr(self):
250 # Simple objects, small containers and classes that override __repr__

Callers

nothing calls this directly

Calls 3

isrecursiveMethod · 0.95
isreadableMethod · 0.95
assertFalseMethod · 0.80

Tested by

no test coverage detected