summaryrefslogtreecommitdiff
path: root/Lib/test/test_pkg.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-09-08 16:06:20 +0000
committerGuido van Rossum <guido@python.org>1997-09-08 16:06:20 +0000
commitc8bf884248e58f0d61ac020c60be01b048c60b2b (patch)
treec95f66f157fa3d857f176b8156f0d3d29e2d1fb7 /Lib/test/test_pkg.py
parente632380b558d696fb0d2c4e7d28a82d439b76df0 (diff)
downloadcpython-git-c8bf884248e58f0d61ac020c60be01b048c60b2b.tar.gz
Added test for __all__.
Diffstat (limited to 'Lib/test/test_pkg.py')
-rw-r--r--Lib/test/test_pkg.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py
index f078714804..0356cfa986 100644
--- a/Lib/test/test_pkg.py
+++ b/Lib/test/test_pkg.py
@@ -148,6 +148,21 @@ 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()
+"""),
+
]
nontests = [