Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8d1139

Browse files
committed
Add empty __init__.py files to the test packages so the new policy
will recognize them.
1 parent 873c35c commit e8d1139

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_pkg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ def runtest(hier, code):
7070
# Test descriptions
7171

7272
tests = [
73-
("t1", [("t1", None)], "import t1"),
73+
("t1", [("t1", None), ("t1 __init__.py", "")], "import t1"),
7474

7575
("t2", [
7676
("t2", None),
7777
("t2 __init__.py", "'doc for t2'; print __name__, 'loading'"),
7878
("t2 sub", None),
79+
("t2 sub __init__.py", ""),
7980
("t2 sub subsub", None),
8081
("t2 sub subsub __init__.py", "print __name__, 'loading'; spam = 1"),
8182
],
@@ -105,6 +106,7 @@ def runtest(hier, code):
105106
("t3", None),
106107
("t3 __init__.py", "print __name__, 'loading'"),
107108
("t3 sub", None),
109+
("t3 sub __init__.py", ""),
108110
("t3 sub subsub", None),
109111
("t3 sub subsub __init__.py", "print __name__, 'loading'; spam = 1"),
110112
],
@@ -122,6 +124,7 @@ def runtest(hier, code):
122124
("t4 __init__.py", "print __name__, 'loading'"),
123125
("t4 sub.py", "print 'THIS SHOULD NOT BE PRINTED (sub.py)'"),
124126
("t4 sub", None),
127+
("t4 sub __init__.py", ""),
125128
("t4 sub subsub.py", "print 'THIS SHOULD NOT BE PRINTED (subsub.py)'"),
126129
("t4 sub subsub", None),
127130
("t4 sub subsub __init__.py", "print __name__, 'loading'; spam = 1"),

0 commit comments

Comments
 (0)