mirror of https://github.com/pypa/pip
Properly handle newlines in diagnostic error tests
This is necessary to ensure that the output can be compared directly.
This commit is contained in:
parent
6a20f5b056
commit
e857d0f532
|
@ -63,7 +63,7 @@ def rendered_in_ascii(error: DiagnosticPipError, *, color: bool = False) -> str:
|
|||
with io.BytesIO() as stream:
|
||||
console = rich.console.Console(
|
||||
force_terminal=False,
|
||||
file=io.TextIOWrapper(stream, encoding="ascii"),
|
||||
file=io.TextIOWrapper(stream, encoding="ascii", newline=""),
|
||||
color_system="truecolor" if color else None,
|
||||
)
|
||||
console.print(error)
|
||||
|
|
Loading…
Reference in New Issue