(self)
| 1377 | f.close() |
| 1378 | |
| 1379 | def test_bound_methods(self): |
| 1380 | # It should be OK to steal a bound method from a SpooledTemporaryFile |
| 1381 | # and use it independently; when the file rolls over, those bound |
| 1382 | # methods should continue to function |
| 1383 | f = self.do_create(max_size=30) |
| 1384 | read = f.read |
| 1385 | write = f.write |
| 1386 | seek = f.seek |
| 1387 | |
| 1388 | write(b"a" * 35) |
| 1389 | write(b"b" * 35) |
| 1390 | seek(0, 0) |
| 1391 | self.assertEqual(read(70), b'a'*35 + b'b'*35) |
| 1392 | |
| 1393 | def test_properties(self): |
| 1394 | f = tempfile.SpooledTemporaryFile(max_size=10) |
nothing calls this directly
no test coverage detected