diff options
author | Damien George <damien.p.george@gmail.com> | 2016-09-30 14:48:22 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-09-30 14:48:22 +1000 |
commit | 3c582bc7cbed81fbb8f1e9c3741db53eab589cd4 (patch) | |
tree | 861c350a0ef69403ecf93d0c3802e294e2c7a099 | |
parent | 216a711cd4a4b307190db51e36eac2aad2f524d2 (diff) | |
download | micropython-3c582bc7cbed81fbb8f1e9c3741db53eab589cd4.tar.gz micropython-3c582bc7cbed81fbb8f1e9c3741db53eab589cd4.zip |
tests/import: Add test for compiling "import a.b as c".
-rw-r--r-- | tests/import/import_pkg1.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/import/import_pkg1.py b/tests/import/import_pkg1.py index 8cd77af79d..fe6e4473e3 100644 --- a/tests/import/import_pkg1.py +++ b/tests/import/import_pkg1.py @@ -9,3 +9,8 @@ pkg_ = __import__("pkg.mod") print(pkg_ is not pkg.mod) print(pkg_ is pkg) print(pkg_.mod is pkg.mod) + +# import using "as" +import pkg.mod as mm +print(mm is pkg.mod) +print(mm.foo()) |