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

Function test_raw_bytes

tests_python/test_safe_repr.py:629–635  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

627
628
629def test_raw_bytes():
630 safe_repr = SafeRepr()
631 safe_repr.raw_value = True
632 obj = b"\xed\xbd\xbf\xff\xfe\xfa\xfd"
633 raw_value_repr = safe_repr(obj)
634 assert isinstance(raw_value_repr, str) # bytes on py2, str on py3
635 assert raw_value_repr == obj.decode("latin1")
636
637
638def test_raw_unicode():

Callers

nothing calls this directly

Calls 2

SafeReprClass · 0.90
decodeMethod · 0.45

Tested by

no test coverage detected