(self)
| 512 | |
| 513 | @unittest.skipUnless(has_textmode, "text mode not available") |
| 514 | def test_textmode(self): |
| 515 | # _mkstemp_inner can create files in text mode |
| 516 | |
| 517 | # A text file is truncated at the first Ctrl+Z byte |
| 518 | f = self.do_create(bin=0) |
| 519 | f.write(b"blat\x1a") |
| 520 | f.write(b"extra\n") |
| 521 | os.lseek(f.fd, 0, os.SEEK_SET) |
| 522 | self.assertEqual(os.read(f.fd, 20), b"blat") |
| 523 | |
| 524 | def make_temp(self): |
| 525 | return tempfile._mkstemp_inner(tempfile.gettempdir(), |
nothing calls this directly
no test coverage detected