mirror of
https://github.com/W3SLAV/micropython.git
synced 2025-06-20 04:25:34 -04:00

CPython allows this and it's a simple generalisation of the existing code which just supported str/bytes. Fixes issue #5704.
13 lines
214 B
Python
13 lines
214 B
Python
# test builtin exec with a buffer (bytearray/memoryview) input
|
|
|
|
try:
|
|
exec
|
|
bytearray
|
|
memoryview
|
|
except:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
exec(bytearray(b'print(1)'))
|
|
exec(memoryview(b'print(2)'))
|