]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-117860: Add tests for resolving names when import rebind names (GH-118176...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 30 Apr 2024 14:52:44 +0000 (16:52 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Apr 2024 14:52:44 +0000 (14:52 +0000)
commita030bae58498aa9e1bdecc355638383a109168bd
tree917c133fde33e47c8f89cc3bc22538148cc806aa
parent1b12ad59703b49a9240cbe037abe3d1c2f550877
[3.12] gh-117860: Add tests for resolving names when import rebind names (GH-118176) (GH-118432)

Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
(cherry picked from commit c0eaa232f63a62e0e0408911ab5f118dca2af607)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_import/__init__.py
Lib/test/test_import/data/package3/__init__.py [new file with mode: 0644]
Lib/test/test_import/data/package3/submodule.py [new file with mode: 0644]
Lib/test/test_import/data/package4/__init__.py [new file with mode: 0644]
Lib/test/test_import/data/package4/submodule.py [new file with mode: 0644]
Lib/test/test_pkgutil.py
Lib/test/test_unittest/testmock/testpatch.py
Makefile.pre.in