https://github.com/python/cpython/commit/30268b5d2fbb1a5e6c876f0cdc4cbdb5d93315e6
commit: 30268b5d2fbb1a5e6c876f0cdc4cbdb5d93315e6
branch: main
author: Yan Yanchii <[email protected]>
committer: picnixz <[email protected]>
date: 2025-01-12T09:27:28+01:00
summary:
gh-128377: Skip `test_cmd_line.test_non_interactive_output_buffering` when
`PYTHONUNBUFFERED=1` (#128378)
The `test_cmd_line.test_non_interactive_output_buffering` test assumes a
buffered `stdio`
without checking the `PYTHONUNBUFFERED` value. Instead of changing the
environment
variable for the duration of the test, it is better to simply skip it.
files:
M Lib/test/test_cmd_line.py
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index dfdbb80b94d66f..24cf357c581096 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -336,6 +336,8 @@ def test_osx_android_utf8(self):
self.assertEqual(stdout, expected)
self.assertEqual(p.returncode, 0)
+ @unittest.skipIf(os.environ.get("PYTHONUNBUFFERED", "0") != "0",
+ "Python stdio buffering is disabled.")
def test_non_interactive_output_buffering(self):
code = textwrap.dedent("""
import sys
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]