Make a valid python temp file.
(self)
| 97 | |
| 98 | class SubProcessTestCase(tt.TempFileMixin): |
| 99 | def setUp(self): |
| 100 | """Make a valid python temp file.""" |
| 101 | lines = [ "import sys", |
| 102 | "print('on stdout', end='', file=sys.stdout)", |
| 103 | "print('on stderr', end='', file=sys.stderr)", |
| 104 | "sys.stdout.flush()", |
| 105 | "sys.stderr.flush()"] |
| 106 | self.mktmp('\n'.join(lines)) |
| 107 | |
| 108 | def test_system(self): |
| 109 | status = system('%s "%s"' % (python, self.fname)) |