mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-107954: Add PyConfig_MEMBER_BOOL type to PyConfigSpec (#116359)
_PyConfig_AsDict() now returns bool objects for options using the new PyConfig_MEMBER_BOOL type. Update tests for these changes.
This commit is contained in:
parent
22ccf13b33
commit
2b379968e5
4 changed files with 213 additions and 191 deletions
|
@ -634,15 +634,13 @@ class CmdLineTest(unittest.TestCase):
|
|||
PYTHONDONTWRITEBYTECODE=value,
|
||||
PYTHONVERBOSE=value,
|
||||
)
|
||||
dont_write_bytecode = int(bool(value))
|
||||
expected_bool = int(bool(value))
|
||||
code = (
|
||||
"import sys; "
|
||||
"sys.stderr.write(str(sys.flags)); "
|
||||
f"""sys.exit(not (
|
||||
sys.flags.debug == sys.flags.optimize ==
|
||||
sys.flags.verbose ==
|
||||
{expected}
|
||||
and sys.flags.dont_write_bytecode == {dont_write_bytecode}
|
||||
sys.flags.optimize == sys.flags.verbose == {expected}
|
||||
and sys.flags.debug == sys.flags.dont_write_bytecode == {expected_bool}
|
||||
))"""
|
||||
)
|
||||
with self.subTest(envar_value=value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue