(self)
| 217 | self.assertIn(b'BDFL', output) |
| 218 | |
| 219 | def test_check_output_stdin_arg(self): |
| 220 | # check_output() can be called with stdin set to a file |
| 221 | tf = tempfile.TemporaryFile() |
| 222 | self.addCleanup(tf.close) |
| 223 | tf.write(b'pear') |
| 224 | tf.seek(0) |
| 225 | output = subprocess.check_output( |
| 226 | [sys.executable, "-c", |
| 227 | "import sys; sys.stdout.write(sys.stdin.read().upper())"], |
| 228 | stdin=tf) |
| 229 | self.assertIn(b'PEAR', output) |
| 230 | |
| 231 | def test_check_output_input_arg(self): |
| 232 | # check_output() can be called with input set to a string |
nothing calls this directly
no test coverage detected