Given an archive file identified by test_path relative to a test files directory, return a new temp directory where the archive file has been extracted using extract_func. If `verbatim` is True preserve the permissions.
(self, test_path, extract_func=None, verbatim=False, filter=None)
| 201 | os.remove(tf) |
| 202 | |
| 203 | def __extract(self, test_path, extract_func=None, verbatim=False, filter=None): |
| 204 | """ |
| 205 | Given an archive file identified by test_path relative |
| 206 | to a test files directory, return a new temp directory where the |
| 207 | archive file has been extracted using extract_func. |
| 208 | If `verbatim` is True preserve the permissions. |
| 209 | """ |
| 210 | assert test_path and test_path != "" |
| 211 | test_path = to_os_native_path(test_path) |
| 212 | target_path = path.basename(test_path) |
| 213 | target_dir = self.get_temp_dir(target_path) |
| 214 | original_archive = self.get_test_loc(test_path) |
| 215 | extract_func(original_archive, target_dir, verbatim=verbatim, filter=filter) |
| 216 | return target_dir |
| 217 | |
| 218 | def extract_test_zip(self, test_path, *args, **kwargs): |
| 219 | return self.__extract(test_path, extract_zip) |
no test coverage detected