blob: d277a7b9b26709d86840522dc93f89ed8e71fa99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Test MicroPython-specific restrictions of function.__code__ attribute.
try:
(lambda: 0).__code__
except AttributeError:
print("SKIP")
raise SystemExit
import micropython
@micropython.native
def f_native():
pass
# Can't access __code__ when function is native code.
try:
f_native.__code__
except AttributeError:
print("AttributeError")
|