fix(test): relocate fixtures
This commit is contained in:
parent
4fe623c806
commit
fa3de99222
18 changed files with 2 additions and 2 deletions
|
|
@ -63,13 +63,13 @@ def run_scraper_offline(fixture_text):
|
||||||
target = target.removeprefix("https://cses.fi")
|
target = target.removeprefix("https://cses.fi")
|
||||||
|
|
||||||
if target.strip("/") == "problemset":
|
if target.strip("/") == "problemset":
|
||||||
return fixture_text("cses/cses_contests.html")
|
return fixture_text("cses/contests.html")
|
||||||
|
|
||||||
if target.startswith("/problemset/task/") or target.startswith(
|
if target.startswith("/problemset/task/") or target.startswith(
|
||||||
"problemset/task/"
|
"problemset/task/"
|
||||||
):
|
):
|
||||||
pid = target.rstrip("/").split("/")[-1]
|
pid = target.rstrip("/").split("/")[-1]
|
||||||
return fixture_text(f"cses/cses_task_{pid}.html")
|
return fixture_text(f"cses/task_{pid}.html")
|
||||||
|
|
||||||
raise AssertionError(f"No fixture for CSES path={path!r} url={url!r}")
|
raise AssertionError(f"No fixture for CSES path={path!r} url={url!r}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue