All checks were successful
build / build (push) Successful in 2m18s
- basic generation of json files
- supported parsers:
- healthcheck
- result-detail
- result-status
- file
- log
- dummy
- keyword (keyword, clangtidy, cppcheck, cpplint)
- diff
- `convert` functions is mature, tested in engr151-24fa last two homeworks and engr151-24fa p3
- teapot and healthcheck should be up to date
Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Reviewed-on: https://focs.ji.sjtu.edu.cn/git/JOJ/JOJ3-config-generator/pulls/10
Reviewed-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Co-authored-by: jon-lee <jon-lee@sjtu.edu.cn>
Co-committed-by: jon-lee <jon-lee@sjtu.edu.cn>
19 lines
679 B
Python
19 lines
679 B
Python
import json
|
|
from pathlib import Path
|
|
|
|
from joj3_config_generator.convert import convert
|
|
from joj3_config_generator.load import load_joj3_toml
|
|
|
|
|
|
def load_case(case_name: str) -> None:
|
|
root = Path(__file__).resolve().parent
|
|
repo_toml_path = root / case_name / "repo.toml"
|
|
task_toml_path = root / case_name / "task.toml"
|
|
repo_conf, task_conf = load_joj3_toml(root, repo_toml_path, task_toml_path)
|
|
result_json_path = root / case_name / "task.json"
|
|
expected_result = json.loads(result_json_path.read_text())
|
|
result = convert(repo_conf, task_conf).model_dump(
|
|
mode="json", by_alias=True, exclude_none=True
|
|
)
|
|
assert result == expected_result
|