]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (#124845)
authorMark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
Wed, 2 Oct 2024 09:58:39 +0000 (11:58 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Oct 2024 09:58:39 +0000 (12:58 +0300)
commit8fbf10d6cfd9c69ffcc1f80fa0c5f33785197af7
treea38bf285b569c26f84aed85f716994754eae54aa
parent6737333ac5777345d058271621ccb3c2d11dc81e
gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (#124845)

Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered.
---------

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_funcattrs.py