(self)
| 50 | self.assertEqual(f.read(), b'newcontent') |
| 51 | |
| 52 | def test_overwrite_dir_as_file(self): |
| 53 | target = os.path.join(self.testdir, 'test') |
| 54 | os.mkdir(target) |
| 55 | with self.open(self.ar_with_file) as ar: |
| 56 | with self.assertRaises(PermissionError if sys.platform == 'win32' |
| 57 | else IsADirectoryError): |
| 58 | self.extractall(ar) |
| 59 | self.assertTrue(os.path.isdir(target)) |
| 60 | |
| 61 | def test_overwrite_file_as_dir(self): |
| 62 | target = os.path.join(self.testdir, 'test') |
nothing calls this directly
no test coverage detected