(self)
| 1973 | f"{stacks}```") |
| 1974 | |
| 1975 | def test_encoding_warning(self): |
| 1976 | code = textwrap.dedent("""\ |
| 1977 | from subprocess import * |
| 1978 | run("echo hello", shell=True, text=True) |
| 1979 | check_output("echo hello", shell=True, text=True) |
| 1980 | """) |
| 1981 | cp = subprocess.run([sys.executable, "-Xwarn_default_encoding", "-c", code], |
| 1982 | capture_output=True) |
| 1983 | lines = cp.stderr.splitlines() |
| 1984 | self.assertEqual(len(lines), 2, lines) |
| 1985 | self.assertStartsWith(lines[0], b"<string>:2: EncodingWarning: ") |
| 1986 | self.assertStartsWith(lines[1], b"<string>:3: EncodingWarning: ") |
| 1987 | |
| 1988 | |
| 1989 | def _get_test_grp_name(): |
nothing calls this directly
no test coverage detected