Skip to content

Commit 9730dc1

Browse files
authored
Enable tests to run from top level of git repo
1 parent 95e827e commit 9730dc1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/resources/testing_data.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
from pathlib import Path
23

34
compat = {
45
"name": "layer",
@@ -7784,7 +7785,11 @@
77847785
],
77857786
}
77867787

7787-
with open("resources/collection-1.json", "r", encoding="utf-16") as input_file:
7788+
# Get the directory of this file to create absolute path
7789+
current_dir = Path(__file__).parent
7790+
collection_path = current_dir / "collection-1.json"
7791+
7792+
with open(collection_path, "r", encoding="utf-16") as input_file:
77887793
collection = json.load(input_file)
77897794

77907795

0 commit comments

Comments
 (0)