mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Write snapshot file as utf-8
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
import difflib
|
import difflib
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from functools import partial
|
from functools import partial
|
||||||
@@ -122,7 +120,7 @@ def pytest_sessionfinish(
|
|||||||
num_snapshot_tests=num_snapshot_tests,
|
num_snapshot_tests=num_snapshot_tests,
|
||||||
now=datetime.utcnow(),
|
now=datetime.utcnow(),
|
||||||
)
|
)
|
||||||
with open(snapshot_report_path, "w+") as snapshot_file:
|
with open(snapshot_report_path, "w+", encoding="utf-8") as snapshot_file:
|
||||||
snapshot_file.write(rendered_report)
|
snapshot_file.write(rendered_report)
|
||||||
|
|
||||||
session.config._textual_snapshots = diffs
|
session.config._textual_snapshots = diffs
|
||||||
|
|||||||
Reference in New Issue
Block a user