16 lines
936 B
ReStructuredText
16 lines
936 B
ReStructuredText
Pytest now uses its own ``TerminalWriter`` class instead of using the one from the ``py`` library.
|
|
Plugins generally access this class through ``TerminalReporter.writer``, ``TerminalReporter.write()``
|
|
(and similar methods), or ``_pytest.config.create_terminal_writer()``.
|
|
|
|
The following breaking changes were made:
|
|
|
|
- Output (``write()`` method and others) no longer flush implicitly; the flushing behavior
|
|
of the underlying file is respected. To flush explicitly (for example, if you
|
|
want output to be shown before an end-of-line is printed), use ``write(flush=True)`` or
|
|
``terminal_writer.flush()``.
|
|
- Explicit Windows console support was removed, delegated to the colorama library.
|
|
- Support for writing ``bytes`` was removed.
|
|
- The ``reline`` method and ``chars_on_current_line`` property were removed.
|
|
- The ``stringio`` and ``encoding`` arguments was removed.
|
|
- Support for passing a callable instead of a file was removed.
|