diff options
author | Victor Stinner <vstinner@python.org> | 2024-03-06 09:29:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 09:29:27 (GMT) |
commit | 2b379968e554f9ce0832e84f5f8a85131a3be35e (patch) | |
tree | 9c2d9a8e73d8a9b9b93b6575bf703242da182def /Lib/test/test_cmd_line.py | |
parent | 22ccf13b332902142fe0c52c593f9efc152c7761 (diff) | |
download | cpython-2b379968e554f9ce0832e84f5f8a85131a3be35e.zip cpython-2b379968e554f9ce0832e84f5f8a85131a3be35e.tar.gz cpython-2b379968e554f9ce0832e84f5f8a85131a3be35e.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r-- | Lib/test/test_cmd_line.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 1fe3b2f..6796dc6 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -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): |