From 585f94439034d0c6f79f026d364470a6c0c7f139 Mon Sep 17 00:00:00 2001 From: jableader Date: Wed, 5 Nov 2025 19:58:08 +1100 Subject: [PATCH] Scraping tests pass --- tests/test_recipes_offline_expected.py | 4 ++++ 1 file changed, 4 insertions(+) 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"