Skip to content

Commit 72178f4

Browse files
László Vaskóe3krisztian
authored andcommitted
remove unused function get_existing_extract_dirs
1 parent f1c2620 commit 72178f4

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

tests/test_processing.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
calculate_entropy,
1111
calculate_unknown_chunks,
1212
draw_entropy_plot,
13-
get_existing_extract_dirs,
1413
get_extract_dir_for_input,
1514
remove_inner_chunks,
1615
)
@@ -163,26 +162,3 @@ def test_get_extract_dir_for_input(
163162
assert get_extract_dir_for_input(cfg, Path(path)) == (
164163
cfg.extract_root / Path(extract_dir_prefix + cfg.extract_suffix)
165164
)
166-
167-
168-
def test_existing_extract_dirs_can_be_found(tmp_path: Path):
169-
cfg = ExtractionConfig(extract_root=tmp_path, entropy_depth=0)
170-
171-
already_extracted_files = [
172-
Path("have_been_extracted"),
173-
Path("some_directory") / "also_have_been_extacted",
174-
]
175-
existing_extract_dirs = [
176-
tmp_path / (e.name + cfg.extract_suffix) for e in already_extracted_files
177-
]
178-
179-
for e in existing_extract_dirs:
180-
e.mkdir()
181-
182-
to_be_extracted_files = [
183-
Path("yet_to_extract"),
184-
Path("some_other_directory") / "also_yet_to_extract",
185-
]
186-
files_to_extract = already_extracted_files + to_be_extracted_files
187-
188-
assert get_existing_extract_dirs(cfg, files_to_extract) == existing_extract_dirs

unblob/processing.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,6 @@ def check_extract_directory(task: Task, config: ExtractionConfig):
9696

9797
return errors
9898

99-
def get_existing_extract_dirs(
100-
config: ExtractionConfig, paths: Iterable[Path]
101-
) -> List[Path]:
102-
extract_dirs = []
103-
for path in paths:
104-
if path.is_dir():
105-
subpaths = path.iterdir()
106-
else:
107-
subpaths = [path]
108-
for path in subpaths:
109-
d = get_extract_dir_for_input(config, path)
110-
if d.exists():
111-
extract_dirs.append(d)
112-
113-
return extract_dirs
114-
11599

116100
def _process_one_file(config: ExtractionConfig, root_task: Task) -> ProcessResult:
117101
processor = Processor(config)

0 commit comments

Comments
 (0)