diff --git a/tests/examples/conftest.py b/tests/examples/conftest.py index 8874654eda..858a2bd330 100644 --- a/tests/examples/conftest.py +++ b/tests/examples/conftest.py @@ -38,7 +38,7 @@ STORIES_DIR = Path(stories.__file__).parent BASE_URL = "http://127.0.0.1:8000" -MANIFEST = tomllib.loads((STORIES_DIR / "manifest.toml").read_text()) +MANIFEST = tomllib.loads((STORIES_DIR / "manifest.toml").read_text(encoding="utf-8")) DEFAULTS: dict[str, Any] = MANIFEST["defaults"] STORIES: dict[str, dict[str, Any]] = MANIFEST["story"] diff --git a/tests/examples/test_story_shape.py b/tests/examples/test_story_shape.py index d5510923c9..e46fe2120a 100644 --- a/tests/examples/test_story_shape.py +++ b/tests/examples/test_story_shape.py @@ -27,7 +27,7 @@ def _parse(path: Path) -> ast.Module: """Parse ``path`` into an AST module.""" - return ast.parse(path.read_text(), filename=str(path)) + return ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) def _resolve(node: ast.ImportFrom, package: str) -> str: