diff --git a/tests/integration/test_area_chart.py b/tests/integration/test_area_chart.py index 91aec2e..c93a2b0 100644 --- a/tests/integration/test_area_chart.py +++ b/tests/integration/test_area_chart.py @@ -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() diff --git a/tests/integration/test_scatter_chart.py b/tests/integration/test_scatter_chart.py index 58bee71..a319b2d 100644 --- a/tests/integration/test_scatter_chart.py +++ b/tests/integration/test_scatter_chart.py @@ -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"] @@ -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]: