Skip to content

Commit

Permalink
test: support unittest
Browse files Browse the repository at this point in the history
Signed-off-by: thefool0 <74161809+thefool0000@users.noreply.github.com>
  • Loading branch information
thefool0000 authored and jingfelix committed Dec 30, 2024
1 parent dfabc0e commit ce2ddd5
Show file tree
Hide file tree
Showing 128 changed files with 119 additions and 13,076 deletions.
7 changes: 5 additions & 2 deletions tests/bench_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ def bench_parse():
percentage_diffs_patche = []
percentage_diffs_pydantic = []

for patch_file in os.listdir("tests/cases"):
with open(f"tests/cases/{patch_file}", "r") as f:
for patch_file in os.listdir("tests/cases/patches"):
if not patch_file.split(".")[-1] == "patch":
continue

with open(f"tests/cases/patches/{patch_file}", "r") as f:
patch = f.read()

try:
Expand Down
48 changes: 0 additions & 48 deletions tests/cases/CVE-2017-11176.patch

This file was deleted.

48 changes: 0 additions & 48 deletions tests/cases/CVE-2017-16995.patch

This file was deleted.

62 changes: 0 additions & 62 deletions tests/cases/CVE-2017-18509.patch

This file was deleted.

45 changes: 0 additions & 45 deletions tests/cases/CVE-2017-5123.patch

This file was deleted.

86 changes: 0 additions & 86 deletions tests/cases/CVE-2018-25015.patch

This file was deleted.

77 changes: 0 additions & 77 deletions tests/cases/CVE-2019-10639.patch

This file was deleted.

Loading

0 comments on commit ce2ddd5

Please sign in to comment.