tests/micropython: Add test for import from within viper function.

pull/2657/head
Damien George 2016-11-10 22:54:55 +11:00
rodzic 0f3388de1e
commit 679c0c4c83
2 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,10 @@
# test import within viper function
@micropython.viper
def f():
import micropython
print(micropython.const(1))
from micropython import const
print(const(2))
f()

Wyświetl plik

@ -0,0 +1,2 @@
1
2