Browse Source

investigate JSONDecodeError in github action

Fabian Peter Hammerle 3 years ago
parent
commit
851d1fdea8
1 changed files with 6 additions and 1 deletions
  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")