(self)
| 493 | |
| 494 | @unittest.skipUnless(has_textmode, "text mode not available") |
| 495 | def test_textmode(self): |
| 496 | # _mkstemp_inner can create files in text mode |
| 497 | |
| 498 | # A text file is truncated at the first Ctrl+Z byte |
| 499 | f = self.do_create(bin=0) |
| 500 | f.write(b"blat\x1a") |
| 501 | f.write(b"extra\n") |
| 502 | os.lseek(f.fd, 0, os.SEEK_SET) |
| 503 | self.assertEqual(os.read(f.fd, 20), b"blat") |
| 504 | |
| 505 | def make_temp(self): |
| 506 | return tempfile._mkstemp_inner(tempfile.gettempdir(), |
nothing calls this directly
no test coverage detected