diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index a465923f9..afcee5397 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -389,7 +389,7 @@ def pytest_report_serialize(config, report): In the future it might become part of the public hook API. Serializes the given report object into a data structure suitable for sending - over the wire, or converted to JSON. + over the wire, e.g. converted to JSON. """ @@ -406,7 +406,7 @@ def pytest_report_unserialize(config, data): In the future it might become part of the public hook API. - Restores a report object previously serialized with pytest_report_serialize().; + Restores a report object previously serialized with pytest_report_serialize(). """ diff --git a/src/_pytest/reports.py b/src/_pytest/reports.py index 04cc52691..74faa3f8c 100644 --- a/src/_pytest/reports.py +++ b/src/_pytest/reports.py @@ -267,7 +267,7 @@ def _report_unserialization_failure(type_name, report_class, reportdict): pprint(reportdict, stream=stream) pprint("Please report this bug at %s" % url, stream=stream) pprint("-" * 100, stream=stream) - assert 0, stream.getvalue() + raise RuntimeError(stream.getvalue()) class TestReport(BaseReport):