def test_parametrized_ids_invalid_type(self, pytester: Pytester) -> None:
        """Test error with non-strings/non-ints, without generator (#1857)."""
        pytester.makepyfile(
            """
            import pytest

            @pytest.mark.parametrize("x, expected", [(1, 2), (3, 4), (5, 6)], ids=(None, 2, OSError()))
            def test_ids_numbers(x,expected):
                assert x * 2 == expected
        """
        )
        result = pytester.runpytest()
        result.stdout.fnmatch_lines(
            [
                "In test_ids_numbers: ids contains unsupported value OSError() (type: <class 'OSError'>) at index 2. "
                "Supported types are: str, bytes, int, float, complex, bool, enum, regex or anything with a __name__."
            ]
        )
Test error with non-strings/non-ints, without generator (#1857).
testing/python/metafunc.py