Browse Source

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

pull/2657/head
Damien George 8 years ago
parent
commit
679c0c4c83
  1. 10
      tests/micropython/viper_import.py
  2. 2
      tests/micropython/viper_import.py.exp

10
tests/micropython/viper_import.py

@ -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()

2
tests/micropython/viper_import.py.exp

@ -0,0 +1,2 @@
1
2
Loading…
Cancel
Save