def test_collectreport_fail(self, pytester: Pytester) -> None:
        """This test came originally from test_remote.py in xdist (ca03269)."""
        reprec = pytester.inline_runsource("qwe abc")
        reports = reprec.getreports("pytest_collectreport")
        assert reports
        for rep in reports:
            d = rep._to_json()
            newrep = CollectReport._from_json(d)
            assert newrep.passed == rep.passed
            assert newrep.failed == rep.failed
            assert newrep.skipped == rep.skipped
            if rep.failed:
                assert newrep.longrepr == str(rep.longrepr)
This test came originally from test_remote.py in xdist (ca03269).
testing/test_reports.py