Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions changelog/4488.feature.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
New ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes.
The pytest team has created the `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__
plugin, which provides a new ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes.

Each line of the report log contains a self contained JSON object corresponding to a testing event,
such as a collection or a test result report. The file is guaranteed to be flushed after writing
each line, so systems can read and process events in real-time.

This option is meant to replace ``--resultlog``, which is deprecated and meant to be removed
in a future release. If you use ``--resultlog``, please try out ``--report-log`` and
The plugin is meant to replace the ``--resultlog`` option, which is deprecated and meant to be removed
in a future release. If you use ``--resultlog``, please try out ``pytest-reportlog`` and
provide feedback.
1 change: 0 additions & 1 deletion doc/en/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Full pytest documentation
unittest
nose
xunit_setup
report_log
plugins
writing_plugins
logging
Expand Down
7 changes: 4 additions & 3 deletions doc/en/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ The ``--result-log`` option produces a stream of test reports which can be
analysed at runtime, but it uses a custom format which requires users to implement their own
parser.

The :ref:`--report-log <report_log>` option provides a more standard and extensible alternative, producing
The `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin provides a ``--report-log`` option, a more standard and extensible alternative, producing
one JSON object per-line, and should cover the same use cases. Please try it out and provide feedback.

The plan is remove the ``--result-log`` option in pytest 6.0 after ``--result-log`` proves satisfactory
to all users and is deemed stable.
The plan is remove the ``--result-log`` option in pytest 6.0 if ``pytest-reportlog`` proves satisfactory
to all users and is deemed stable. The ``pytest-reportlog`` plugin might even be merged into the core
at some point, depending on the plans for the plugins and number of users using it.


Removed Features
Expand Down
70 changes: 0 additions & 70 deletions doc/en/report_log.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/en/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ by the `PyPy-test`_ web page to show test results over several revisions.

This option is rarely used and is scheduled for removal in pytest 6.0.

If you use this option, consider using the new :ref:`--result-log <report_log>`.
If you use this option, consider using the new `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin instead.

See `the deprecation docs <https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log>`__
for more information.
Expand Down
1 change: 0 additions & 1 deletion src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def directory_arg(path, optname):
"assertion",
"junitxml",
"resultlog",
"report_log",
"doctest",
"cacheprovider",
"freeze_support",
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


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

Expand Down
72 changes: 0 additions & 72 deletions src/_pytest/report_log.py

This file was deleted.

2 changes: 1 addition & 1 deletion testing/deprecated_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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 6.0*",
"*--result-log is deprecated, please try the new pytest-reportlog plugin.",
"*See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information*",
]
)
Expand Down
54 changes: 0 additions & 54 deletions testing/test_report_log.py

This file was deleted.