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.
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