Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
a722ed53
Commit
a722ed53
authored
Jan 08, 2017
by
Damien George
Browse files
tests/unix/extra_coverage: Add tests for importing frozen packages.
parent
b528e9a4
Changes
6
Hide whitespace changes
Inline
Side-by-side
tests/unix/extra_coverage.py
View file @
a722ed53
...
...
@@ -17,3 +17,15 @@ print(hash(str(data[1], 'utf8')))
# test basic import of frozen scripts
import
frzstr1
import
frzmpy1
# test import of frozen packages with __init__.py
import
frzstr_pkg1
print
(
frzstr_pkg1
.
x
)
import
frzmpy_pkg1
print
(
frzmpy_pkg1
.
x
)
# test import of frozen packages without __init__.py
from
frzstr_pkg2.mod
import
Foo
print
(
Foo
.
x
)
from
frzmpy_pkg2.mod
import
Foo
print
(
Foo
.
x
)
tests/unix/extra_coverage.py.exp
View file @
a722ed53
...
...
@@ -50,3 +50,11 @@ Warning: test
7300
frzstr1
frzmpy1
frzstr_pkg1.__init__
1
frzmpy_pkg1.__init__
1
frzstr_pkg2.mod
1
frzmpy_pkg2.mod
1
unix/coverage-frzmpy/frzmpy_pkg1/__init__.py
0 → 100644
View file @
a722ed53
# test frozen package with __init__.py
print
(
'frzmpy_pkg1.__init__'
)
x
=
1
unix/coverage-frzmpy/frzmpy_pkg2/mod.py
0 → 100644
View file @
a722ed53
# test frozen package without __init__.py
print
(
'frzmpy_pkg2.mod'
)
class
Foo
:
x
=
1
unix/coverage-frzstr/frzstr_pkg1/__init__.py
0 → 100644
View file @
a722ed53
# test frozen package with __init__.py
print
(
'frzstr_pkg1.__init__'
)
x
=
1
unix/coverage-frzstr/frzstr_pkg2/mod.py
0 → 100644
View file @
a722ed53
# test frozen package without __init__.py
print
(
'frzstr_pkg2.mod'
)
class
Foo
:
x
=
1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment