docstr: Report attributes which are path-like should become strings.
docstr_tok: ["Report","attributes","which","are","path-like","should","become","strings","."]
code: def test_paths_support(self, pytester: Pytester) -> None:
      """Report attributes which are path-like should become strings."""
      pytester.makepyfile(
          """
              def test_a():
                  assert False
          """
      )
  
      class MyPathLike:
          def __init__(self, path: str) -> None:
              self.path = path
  
          def __fspath__(self) -> str:
              return self.path
  
      reprec = pytester.inline_run()
      reports = reprec.getreports("pytest_runtest_logreport")
      assert len(reports) == 3
      test_a_call = reports[1]
      test_a_call.path1 = MyPathLike(str(pytester.path))  # type: ignore[attr-defined]
      test_a_call.path2 = pytester.path  # type: ignore[attr-defined]
      data = test_a_call._to_json()
      assert data["path1"] == str(pytester.path)
      assert data["path2"] == str(pytester.path)
  
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 9 for calling the TestReportSerialization obj's underlying member method code with example usage: obj.test_paths_support(pytester) and returns: self