circuitpython/tests/basics/class_misc.py
Damien George 9162a87d4d tests/basics: Use bytes not bytearray when checking user buffer proto.
Using bytes will test the same path for the buffer protocol in
py/objtype.c.
2019-10-29 22:22:37 +11:00

10 lines
127 B
Python

# converting user instance to buffer
class C:
pass
c = C()
try:
d = bytes(c)
except TypeError:
print('TypeError')