python / cpython

The Python programming language
https://www.python.org/
Other
60.06k stars 29.09k forks source link

[3.12] gh-117860: Add tests for resolving names when import rebind names (GH-118176) #118432

Closed miss-islington closed 3 weeks ago

miss-islington commented 3 weeks ago

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