summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pkg.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pkg.py')
-rw-r--r--Lib/test/test_pkg.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py
index fde99dc..630956d 100644
--- a/Lib/test/test_pkg.py
+++ b/Lib/test/test_pkg.py
@@ -192,11 +192,13 @@ class TestPkg(unittest.TestCase):
import t5
self.assertEqual(fixdir(dir(t5)),
['__doc__', '__file__', '__name__',
- '__path__', 'foo', 'string', 't5'])
+ '__package__', '__path__', 'foo', 'string', 't5'])
self.assertEqual(fixdir(dir(t5.foo)),
- ['__doc__', '__file__', '__name__', 'string'])
+ ['__doc__', '__file__', '__name__', '__package__',
+ 'string'])
self.assertEqual(fixdir(dir(t5.string)),
- ['__doc__', '__file__', '__name__', 'spam'])
+ ['__doc__', '__file__', '__name__','__package__',
+ 'spam'])
def test_6(self):
hier = [
@@ -212,14 +214,14 @@ class TestPkg(unittest.TestCase):
import t6
self.assertEqual(fixdir(dir(t6)),
['__all__', '__doc__', '__file__',
- '__name__', '__path__'])
+ '__name__', '__package__', '__path__'])
s = """
import t6
from t6 import *
self.assertEqual(fixdir(dir(t6)),
['__all__', '__doc__', '__file__',
- '__name__', '__path__', 'eggs',
- 'ham', 'spam'])
+ '__name__', '__package__', '__path__',
+ 'eggs', 'ham', 'spam'])
self.assertEqual(dir(), ['eggs', 'ham', 'self', 'spam', 't6'])
"""
self.run_code(s)
@@ -245,17 +247,19 @@ class TestPkg(unittest.TestCase):
t7, sub, subsub = None, None, None
import t7 as tas
self.assertEqual(fixdir(dir(tas)),
- ['__doc__', '__file__', '__name__', '__path__'])
+ ['__doc__', '__file__', '__name__',
+ '__package__', '__path__'])
self.failIf(t7)
from t7 import sub as subpar
self.assertEqual(fixdir(dir(subpar)),
- ['__doc__', '__file__', '__name__', '__path__'])
+ ['__doc__', '__file__', '__name__',
+ '__package__', '__path__'])
self.failIf(t7)
self.failIf(sub)
from t7.sub import subsub as subsubsub
self.assertEqual(fixdir(dir(subsubsub)),
- ['__doc__', '__file__', '__name__', '__path__',
- 'spam'])
+ ['__doc__', '__file__', '__name__',
+ '__package__', '__path__', 'spam'])
self.failIf(t7)
self.failIf(sub)
self.failIf(subsub)