Skip to content
Snippets Groups Projects
Commit 4d191b31 authored by Daniel Skýpala's avatar Daniel Skýpala
Browse files

Test: Better types

parent 4c9a8e61
No related branches found
No related tags found
No related merge requests found
......@@ -4,13 +4,13 @@ import time
import task_autotest.config as config
def test_task_commit(task_path, commit, workdir="_test"):
def test_task_commit(task_path: str, commit_hash: str, workdir="_test") -> None:
start_time = time.time()
wd = os.path.join(config.REPO_DIR, workdir)
subprocess.run(["git", "checkout", commit], cwd=wd, check=True)
subprocess.run(["git", "checkout", commit_hash], cwd=wd, check=True)
outdir = config.DATA_DIR + "/tests/" + task_path.replace('/', '_') + '/' + commit + '/'
outdir = config.DATA_DIR + "/tests/" + task_path.replace('/', '_') + '/' + commit_hash + '/'
outdir_part = "/".join(outdir.split("/")[:-2])
if not os.path.isdir(outdir_part):
os.mkdir(outdir_part)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment