mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
Added test for __all__.
This commit is contained in:
parent
e632380b55
commit
c8bf884248
2 changed files with 22 additions and 0 deletions
|
@ -146,6 +146,21 @@ import t5
|
|||
print dir(t5)
|
||||
print dir(t5.foo)
|
||||
print dir(t5.string)
|
||||
"""),
|
||||
|
||||
("t6", [
|
||||
("t6", None),
|
||||
("t6 __init__.py", "__all__ = ['spam', 'ham', 'eggs']"),
|
||||
("t6 spam.py", "print __name__, 'loading'"),
|
||||
("t6 ham.py", "print __name__, 'loading'"),
|
||||
("t6 eggs.py", "print __name__, 'loading'"),
|
||||
],
|
||||
"""
|
||||
import t6
|
||||
print dir(t6)
|
||||
from t6 import *
|
||||
print dir(t6)
|
||||
print dir()
|
||||
"""),
|
||||
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue