From d28c94eba76bc72b32ed5a0379b3411947178f5f Mon Sep 17 00:00:00 2001 From: nanjiangwill Date: Thu, 26 Sep 2024 12:08:24 -0400 Subject: [PATCH] fix get-tests --- commit0/harness/get_pytest_ids.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commit0/harness/get_pytest_ids.py b/commit0/harness/get_pytest_ids.py index 5ed2ce7..64891a7 100644 --- a/commit0/harness/get_pytest_ids.py +++ b/commit0/harness/get_pytest_ids.py @@ -1,11 +1,15 @@ import bz2 from typing import List +import commit0 +import os def main(repo: str, verbose: int) -> List[str]: repo = repo.lower() repo = repo.replace(".", "-") - with bz2.open(f"commit0/data/test_ids/{repo}.bz2", "rt") as f: + commit0_path = os.path.dirname(commit0.__file__) + bz2_file = f"{commit0_path}/data/test_ids/{repo}.bz2" + with bz2.open(bz2_file, "rt") as f: out = f.read() if verbose: print(out)