_pytest._io package

Module contents

class TerminalWriter(file=None, stringio=False, encoding=None)[source]

Bases: py._io.terminalwriter.TerminalWriter

fullwidth
_write_source(lines: List[str], indents: Sequence[str] = ())None[source]

Write lines of source code possibly highlighted.

Keeping this private for now because the API is clunky. We should discuss how to evolve the terminal writer so we can have more precise color support, for example being able to write part of a line in one color and the rest in another, and so on.

_highlight(source)[source]

Highlight the given source code according to the “code_highlight” option