瀏覽代碼

investigate JSONDecodeError in github action

Fabian Peter Hammerle 3 年之前
父節點
當前提交
851d1fdea8
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      tests/conftest.py

+ 6 - 1
tests/conftest.py

@@ -38,7 +38,12 @@ def wikimap_export_path() -> pathlib.Path:
 
 @pytest.fixture(scope="session")
 def wikimap_export(wikimap_export_path) -> pathlib.Path:
-    return json.loads(wikimap_export_path.read_text())
+    try:
+        return json.loads(wikimap_export_path.read_text())
+    except json.decoder.JSONDecodeError as exc:
+        if "git-lfs.github.com" in wikimap_export_path.read_text():
+            raise ValueError("git-lfs pointers unresolved") from exc
+        raise
 
 
 @pytest.fixture(scope="session")