Skip to content

Commit 2f8f58d

Browse files
committed
multiplatform
1 parent 7c427d1 commit 2f8f58d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/test_tools/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ def __call__(self, name: str = "") -> "Snapshot": ...
2121
class Snapshot:
2222
def __init__(self, path: Path, for_update: bool) -> None:
2323
self.path = path
24-
self.content = open(path).read()
24+
self.content = open(path, encoding="utf-8").read()
2525
self.for_update = for_update
2626

2727
def __eq__(self, other: object) -> bool:
2828
if self.content == other:
2929
return True
3030
if self.for_update and isinstance(other, str):
31-
with open(self.path, "w") as f:
31+
with open(self.path, "w", encoding="utf-8") as f:
3232
f.write(other)
3333
pytest.xfail(reason=f"Snapshot updated: {self.path}")
3434
return False

0 commit comments

Comments
 (0)