Commit 4780d4ce authored by Vladimír Štill's avatar Vladimír Štill
Browse files

test: Tweak style in checker

parent 0265e6dc
......@@ -18,7 +18,7 @@ def run_checker(task_file: FilePath, solution_file: FilePath, html: bool) \
task = task_handle.read()
args = [sys.executable, # the Python itself
"fja_checker/__main__.py"]
"fja_checker/__main__.py"]
if html:
args.append("--html")
return subprocess.run(args + [solution_file, f"-o{task}"],
......@@ -37,7 +37,7 @@ def run_tests(test_dir: FilePath, html: bool) -> None:
files = filter(lambda x: os.path.isfile(x),
map(lambda x: os.path.join(test_dir, x),
os.listdir(test_dir)))
tests: Dict[FilePath, Set[FilePath]] = dict()
tests: Dict[FilePath, Set[FilePath]] = {}
for basename, suff in map(lambda x: x.split('.', 1), files):
if suff.endswith("ok") or suff.endswith("nok"):
tests.setdefault(f"{basename}.q", set()).add(f"{basename}.{suff}")
......@@ -65,17 +65,17 @@ def run_tests(test_dir: FilePath, html: bool) -> None:
# Test entry points
def test_reg_text():
def test_reg_text() -> None:
run_tests("test/checker/reg", False)
def test_reg_html():
def test_reg_html() -> None:
run_tests("test/checker/reg", True)
def test_cfl_text():
def test_cfl_text() -> None:
run_tests("test/checker/cfl", False)
def test_cfl_html():
def test_cfl_html() -> None:
run_tests("test/checker/cfl", True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment