def test_longreprtext_collect_skip(self, pytester: Pytester) -> None:
        """CollectReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)"""
        pytester.makepyfile(
            """
            import pytest
            pytest.skip(allow_module_level=True)
            """
        )
        rec = pytester.inline_run()
        calls = rec.getcalls("pytest_collectreport")
        _, call, _ = calls
        assert isinstance(call.report.longrepr, tuple)
        assert "Skipped" in call.report.longreprtext
CollectReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)
testing/test_runner.py