diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/micropython/viper_import.py | 10 | ||||
| -rw-r--r-- | tests/micropython/viper_import.py.exp | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/micropython/viper_import.py b/tests/micropython/viper_import.py new file mode 100644 index 000000000..987800744 --- /dev/null +++ b/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() diff --git a/tests/micropython/viper_import.py.exp b/tests/micropython/viper_import.py.exp new file mode 100644 index 000000000..1191247b6 --- /dev/null +++ b/tests/micropython/viper_import.py.exp @@ -0,0 +1,2 @@ +1 +2 |
