(self)
| 2043 | self.assertTrue(os.path.isfile('test.zip')) |
| 2044 | |
| 2045 | def test_register_archive_format(self): |
| 2046 | |
| 2047 | self.assertRaises(TypeError, register_archive_format, 'xxx', 1) |
| 2048 | self.assertRaises(TypeError, register_archive_format, 'xxx', lambda: x, |
| 2049 | 1) |
| 2050 | self.assertRaises(TypeError, register_archive_format, 'xxx', lambda: x, |
| 2051 | [(1, 2), (1, 2, 3)]) |
| 2052 | |
| 2053 | register_archive_format('xxx', lambda: x, [(1, 2)], 'xxx file') |
| 2054 | formats = [name for name, params in get_archive_formats()] |
| 2055 | self.assertIn('xxx', formats) |
| 2056 | |
| 2057 | unregister_archive_format('xxx') |
| 2058 | formats = [name for name, params in get_archive_formats()] |
| 2059 | self.assertNotIn('xxx', formats) |
| 2060 | |
| 2061 | def test_make_tarfile_rootdir_nodir(self): |
| 2062 | # GH-99203: Test with root_dir is not a real directory. |
nothing calls this directly
no test coverage detected