mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fixes issue 15039: namespace packages are no longer imported in preference to modules of the same name.
This commit is contained in:
parent
e6bdc8f2dd
commit
e51a36922f
7 changed files with 983 additions and 965 deletions
|
@ -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__())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue