(self, num_zeroes, tail)
| 1232 | unlink(TESTFN) |
| 1233 | |
| 1234 | def _make_test_file(self, num_zeroes, tail): |
| 1235 | if sys.platform[:3] == 'win' or is_apple: |
| 1236 | requires('largefile', |
| 1237 | 'test requires %s bytes and a long time to run' % str(0x180000000)) |
| 1238 | f = open(TESTFN, 'w+b') |
| 1239 | try: |
| 1240 | f.seek(num_zeroes) |
| 1241 | f.write(tail) |
| 1242 | f.flush() |
| 1243 | except (OSError, OverflowError, ValueError): |
| 1244 | try: |
| 1245 | f.close() |
| 1246 | except (OSError, OverflowError): |
| 1247 | pass |
| 1248 | raise unittest.SkipTest("filesystem does not have largefile support") |
| 1249 | return f |
| 1250 | |
| 1251 | def test_large_offset(self): |
| 1252 | with self._make_test_file(0x14FFFFFFF, b" ") as f: |
no test coverage detected