Scraping tests pass
This commit is contained in:
parent
2960eff187
commit
585f944390
1 changed files with 4 additions and 0 deletions
|
|
@ -52,7 +52,11 @@ def _actual_subset(model):
|
||||||
@pytest.mark.parametrize("exp_path", _iter_expected_files())
|
@pytest.mark.parametrize("exp_path", _iter_expected_files())
|
||||||
def test_offline_parse_matches_expected(exp_path: Path):
|
def test_offline_parse_matches_expected(exp_path: Path):
|
||||||
async def _run():
|
async def _run():
|
||||||
|
# exp_path is <slug>.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
|
slug = exp_path.stem
|
||||||
|
if slug.endswith(".recipe"):
|
||||||
|
slug = slug[: -len(".recipe")]
|
||||||
expected = _load_expected(exp_path)
|
expected = _load_expected(exp_path)
|
||||||
|
|
||||||
html_path = SNAP_DIR / f"{slug}.html"
|
html_path = SNAP_DIR / f"{slug}.html"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue