Skip to content

Commit 679c0c4

Browse files
committed
tests/micropython: Add test for import from within viper function.
1 parent 0f3388d commit 679c0c4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/micropython/viper_import.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# test import within viper function
2+
3+
@micropython.viper
4+
def f():
5+
import micropython
6+
print(micropython.const(1))
7+
8+
from micropython import const
9+
print(const(2))
10+
f()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1
2+
2

0 commit comments

Comments
 (0)