Skip to content

Commit

Permalink
Merge pull request #5438 from nicoddemus/result-log-deprecation
Browse files Browse the repository at this point in the history
Postpone removal of --result-log to pytest 6.0
  • Loading branch information
asottile committed Jun 12, 2019
2 parents d637d1b + 52780f3 commit ede8b87
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions changelog/4488.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The removal of the ``--result-log`` option and module has been postponed to (tentatively) pytest 6.0 as
the team has not yet got around to implement a good alternative for it.
17 changes: 9 additions & 8 deletions doc/en/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,21 @@ Becomes:
Result log (``--result-log``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. deprecated:: 4.0

The ``--result-log`` option produces a stream of test reports which can be
analysed at runtime. It uses a custom format which requires users to implement their own
parser, but the team believes using a line-based format that can be parsed using standard
tools would provide a suitable and better alternative.

The ``--resultlog`` command line option has been deprecated: it is little used
and there are more modern and better alternatives, for example `pytest-tap <https://tappy.readthedocs.io/en/latest/>`_.

This feature will be effectively removed in pytest 4.0 as the team intends to include a better alternative in the core.
The current plan is to provide an alternative in the pytest 5.0 series and remove the ``--result-log``
option in pytest 6.0 after the new implementation proves satisfactory to all users and is deemed
stable.

If you have any concerns, please don't hesitate to `open an issue <https://github.com/pytest-dev/pytest/issues>`__.
The actual alternative is still being discussed in issue `#4488 <https://github.com/pytest-dev/pytest/issues/4488>`__.

Removed Features
----------------
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)

RESULT_LOG = PytestDeprecationWarning(
"--result-log is deprecated and scheduled for removal in pytest 5.0.\n"
"--result-log is deprecated and scheduled for removal in pytest 6.0.\n"
"See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information."
)

Expand Down
2 changes: 1 addition & 1 deletion testing/deprecated_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test():
result = testdir.runpytest("--result-log=%s" % testdir.tmpdir.join("result.log"))
result.stdout.fnmatch_lines(
[
"*--result-log is deprecated and scheduled for removal in pytest 5.0*",
"*--result-log is deprecated and scheduled for removal in pytest 6.0*",
"*See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information*",
]
)
Expand Down

0 comments on commit ede8b87

Please sign in to comment.