docstr: Check handling of failure during deserialization of report types.
docstr_tok: ["Check","handling","of","failure","during","deserialization","of","report","types","."]
code: def test_deserialization_failure(self, pytester: Pytester) -> None:
      """Check handling of failure during deserialization of report types."""
      pytester.makepyfile(
          """
              def test_a():
                  assert False
          """
      )
      reprec = pytester.inline_run()
      reports = reprec.getreports("pytest_runtest_logreport")
      assert len(reports) == 3
      test_a_call = reports[1]
      data = test_a_call._to_json()
      entry = data["longrepr"]["reprtraceback"]["reprentries"][0]
      assert entry["type"] == "ReprEntry"
  
      entry["type"] = "Unknown"
      with pytest.raises(
          RuntimeError,
          match="INTERNALERROR: Unknown entry type returned: Unknown",
      ):
          TestReport._from_json(data)
  
imports: from typing import Sequence
  from typing import Union
  import pytest
  from _pytest._code.code import ExceptionChainRepr
  from _pytest._code.code import ExceptionRepr
  from _pytest.config import Config
  from _pytest.pytester import Pytester
  from _pytest.python_api import approx
  from _pytest.reports import CollectReport
  from _pytest.reports import TestReport
label_desc: Use image node_id 10 for calling the TestReportSerialization obj's underlying member method code with example usage: obj.test_deserialization_failure(pytester) without return types