MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / assert_saferepr

Method assert_saferepr

tests_python/test_safe_repr.py:23–37  ·  view source on GitHub ↗
(self, value, expected)

Source from the content-addressed store, hash-verified

21 saferepr = SafeRepr()
22
23 def assert_saferepr(self, value, expected):
24 safe = self.saferepr(value)
25
26 if len(safe) != len(expected):
27 raise AssertionError(
28 "Expected:\n%s\nFound:\n%s\n Expected len: %s Found len: %s"
29 % (
30 expected,
31 safe,
32 len(expected),
33 len(safe),
34 )
35 )
36 assert safe == expected
37 return safe
38
39 def assert_unchanged(self, value, expected):
40 actual = repr(value)

Callers 7

assert_unchangedMethod · 0.95
assert_shortenedMethod · 0.95
test_unicode_rawMethod · 0.80
test_bytes_rawMethod · 0.80
test_bytearray_rawMethod · 0.80
test_sortedMethod · 0.80
test_broken_reprMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected