Skip to content

Commit bf6b732

Browse files
committed
Properly handle newlines in diagnostic error tests
This is necessary to ensure that the output can be compared directly.
1 parent 16b5dfe commit bf6b732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/unit/test_exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def rendered_in_ascii(error: DiagnosticPipError, *, color: bool = False) -> str:
6363
with io.BytesIO() as stream:
6464
console = rich.console.Console(
6565
force_terminal=False,
66-
file=io.TextIOWrapper(stream, encoding="ascii"),
66+
file=io.TextIOWrapper(stream, encoding="ascii", newline=""),
6767
color_system="truecolor" if color else None,
6868
)
6969
console.print(error)

0 commit comments

Comments
 (0)