Skip to content

Commit

Permalink
Fix bench_fonll
Browse files Browse the repository at this point in the history
  • Loading branch information
andreab1997 committed Sep 21, 2023
1 parent b59b268 commit 238f880
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions benchmarks/bench_fonll.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import pineko


@pytest.mark.parametrize("theoryid", [400, 208])
def benchmark_produce_fonll_tcards(tmp_path, test_files, test_configs, theoryid):
@pytest.mark.parametrize("theoryid,is_mixed", [(400, False), (208, True)])
def benchmark_produce_fonll_tcards(
tmp_path, test_files, test_configs, theoryid, is_mixed
):
tcard = pineko.theory_card.load(theoryid)
tcard_paths_list = pineko.fonll.produce_fonll_tcards(tcard, tmp_path, theoryid)
# Check they are correct
Expand All @@ -15,10 +17,10 @@ def benchmark_produce_fonll_tcards(tmp_path, test_files, test_configs, theoryid)
theorycards.append(yaml.safe_load(f))
for simFONLL_tcard, fns, nfff, po, part in zip(
theorycards,
pineko.fonll.FNS_LIST,
pineko.fonll.NFFF_LIST,
pineko.fonll.produce_ptos(tcard["FNS"]),
pineko.fonll.PARTS_LIST,
pineko.fonll.MIXED_FNS_LIST if is_mixed else pineko.fonll.FNS_LIST,
pineko.fonll.MIXED_NFFF_LIST if is_mixed else pineko.fonll.NFFF_LIST,
pineko.fonll.produce_ptos(tcard["FNS"], is_mixed),
pineko.fonll.MIXED_PARTS_LIST if is_mixed else pineko.fonll.PARTS_LIST,
):
assert simFONLL_tcard["FNS"] == fns
assert simFONLL_tcard["NfFF"] == nfff
Expand Down

0 comments on commit 238f880

Please sign in to comment.