summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_namespace_pkgs.py
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2012-06-24 23:13:55 (GMT)
committerEric V. Smith <eric@trueblade.com>2012-06-24 23:13:55 (GMT)
commite51a36922ffcce8c5e45cc88dc95a9d33ead0f11 (patch)
tree77a4d11d13469e4aed6530c841252d98819ef198 /Lib/test/test_namespace_pkgs.py
parente6bdc8f2dd0d8cb495e61d08f1db9e0e19c03b1d (diff)
downloadcpython-e51a36922ffcce8c5e45cc88dc95a9d33ead0f11.zip
cpython-e51a36922ffcce8c5e45cc88dc95a9d33ead0f11.tar.gz
cpython-e51a36922ffcce8c5e45cc88dc95a9d33ead0f11.tar.bz2
Fixes issue 15039: namespace packages are no longer imported in preference to modules of the same name.
Diffstat (limited to 'Lib/test/test_namespace_pkgs.py')
-rw-r--r--Lib/test/test_namespace_pkgs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_namespace_pkgs.py b/Lib/test/test_namespace_pkgs.py
index 02b5528..7ad511f 100644
--- a/Lib/test/test_namespace_pkgs.py
+++ b/Lib/test/test_namespace_pkgs.py
@@ -276,6 +276,14 @@ class ZipWithMissingDirectory(NamespacePackageTest):
self.assertEqual(bar.two.attr, 'missing_directory foo two')
+class ModuleAndFileInSameDir(NamespacePackageTest):
+ paths = ['module_and_file']
+
+ def test_module_before_namespace_package(self):
+ import a_test
+ self.assertEqual(a_test.attr, 'in module')
+
+
def test_main():
run_unittest(*NamespacePackageTest.__subclasses__())