mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.14] gh-136438: Make sure test_builtins
pass with all optimization levels (GH-136474) (#136496)
Some checks are pending
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Some checks are pending
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
gh-136438: Make sure `test_builtins` pass with all optimization levels (GH-136474)
(cherry picked from commit c176543349
)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
7880421983
commit
2de82bcc62
1 changed files with 2 additions and 2 deletions
|
@ -436,7 +436,7 @@ class BuiltinTest(ComplexesAreIdenticalMixin, unittest.TestCase):
|
||||||
# test both direct compilation and compilation via AST
|
# test both direct compilation and compilation via AST
|
||||||
codeobjs = []
|
codeobjs = []
|
||||||
codeobjs.append(compile(codestr, "<test>", "exec", optimize=optval))
|
codeobjs.append(compile(codestr, "<test>", "exec", optimize=optval))
|
||||||
tree = ast.parse(codestr)
|
tree = ast.parse(codestr, optimize=optval)
|
||||||
codeobjs.append(compile(tree, "<test>", "exec", optimize=optval))
|
codeobjs.append(compile(tree, "<test>", "exec", optimize=optval))
|
||||||
for code in codeobjs:
|
for code in codeobjs:
|
||||||
ns = {}
|
ns = {}
|
||||||
|
@ -624,7 +624,7 @@ class BuiltinTest(ComplexesAreIdenticalMixin, unittest.TestCase):
|
||||||
for opt in [opt1, opt2]:
|
for opt in [opt1, opt2]:
|
||||||
opt_right = opt.value.right
|
opt_right = opt.value.right
|
||||||
self.assertIsInstance(opt_right, ast.Constant)
|
self.assertIsInstance(opt_right, ast.Constant)
|
||||||
self.assertEqual(opt_right.value, True)
|
self.assertEqual(opt_right.value, __debug__)
|
||||||
|
|
||||||
def test_delattr(self):
|
def test_delattr(self):
|
||||||
sys.spam = 1
|
sys.spam = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue