Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/integration/test_area_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
def load_sample_json(filename: str) -> dict:
"""Load a sample JSON file from tests/samples/area directory."""
samples_dir = Path(__file__).parent.parent / "samples" / "area"
with open(samples_dir / filename) as f:
with open(samples_dir / filename, encoding="utf-8") as f:
return json.load(f)


def load_sample_csv(filename: str) -> str:
"""Load a sample CSV file from tests/samples/area directory."""
samples_dir = Path(__file__).parent.parent / "samples" / "area"
with open(samples_dir / filename) as f:
with open(samples_dir / filename, encoding="utf-8") as f:
return f.read()


Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_scatter_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def load_sample_json(filename: str) -> dict:
"""Load a sample JSON file from tests/samples/scatter/."""
path = Path(__file__).parent.parent / "samples" / "scatter" / filename
with open(path) as f:
with open(path, encoding="utf-8") as f:
data = json.load(f)
return data["chart"]["crdt"]["data"]

Expand All @@ -22,7 +22,7 @@ def load_sample_csv(filename: str) -> str:
"""Load a sample CSV file from tests/samples/scatter/."""
path = Path(__file__).parent.parent / "samples" / "scatter" / filename
# Read the file and convert tabs to commas if needed
with open(path) as f:
with open(path, encoding="utf-8") as f:
content = f.read()
# Check if this is a tab-delimited file
if "\t" in content.split("\n")[0]:
Expand Down