(self)
| 357 | self.large_file_ops(f) |
| 358 | |
| 359 | def test_with_open(self): |
| 360 | for bufsize in (0, 100): |
| 361 | with self.open(os_helper.TESTFN, "wb", bufsize) as f: |
| 362 | f.write(b"xxx") |
| 363 | self.assertEqual(f.closed, True) |
| 364 | try: |
| 365 | with self.open(os_helper.TESTFN, "wb", bufsize) as f: |
| 366 | 1/0 |
| 367 | except ZeroDivisionError: |
| 368 | self.assertEqual(f.closed, True) |
| 369 | else: |
| 370 | self.fail("1/0 didn't raise an exception") |
| 371 | |
| 372 | # issue 5008 |
| 373 | def test_append_mode_tell(self): |
nothing calls this directly
no test coverage detected