Skip to content

Commit

Permalink
integration-tests: Ignore files larger than 10MB
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyfuture committed Sep 13, 2024
1 parent 6e66277 commit ebbe298
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration-tests/fetch-corpora.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Archive(NamedTuple):

CORPORA_PATH: Final = Path(__file__).parent.resolve() / "corpora"

FILE_SIZE_LIMIT: Final = 10 * 1024 ** 2

ARCHIVE_DESCRIPTIONS: Final = (
Archive(
Expand Down Expand Up @@ -286,6 +287,9 @@ def _filter(member: tarfile.TarInfo, path: str) -> tarfile.TarInfo | None:
if member is None:
return None

if member.size > FILE_SIZE_LIMIT:
return None

member_path = member.name
root_folder = archive_description.archive_documents_root
if member_path.endswith(".xml") and member_path.startswith(root_folder):
Expand Down

0 comments on commit ebbe298

Please sign in to comment.