diff --git a/tests/test_recipes_offline_expected.py b/tests/test_recipes_offline_expected.py index da09245..604ef19 100644 --- a/tests/test_recipes_offline_expected.py +++ b/tests/test_recipes_offline_expected.py @@ -52,7 +52,11 @@ def _actual_subset(model): @pytest.mark.parametrize("exp_path", _iter_expected_files()) def test_offline_parse_matches_expected(exp_path: Path): async def _run(): + # exp_path is .recipe.json; Path.stem removes only the last suffix (".json"), + # leaving ".recipe" in the stem. Strip the trailing ".recipe" to get the HTML slug. slug = exp_path.stem + if slug.endswith(".recipe"): + slug = slug[: -len(".recipe")] expected = _load_expected(exp_path) html_path = SNAP_DIR / f"{slug}.html"