mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
22a442181d
commit
30268b5d2f
1 changed files with 2 additions and 0 deletions
|
@ -336,6 +336,8 @@ class CmdLineTest(unittest.TestCase):
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue