def test_silence_unknown_key_warning(self, pytester: Pytester) -> None:
        """Unknown config key warnings can be silenced using filterwarnings (#7620)"""
        pytester.makeini(
            """
            [pytest]
            filterwarnings =
                ignore:Unknown config option:pytest.PytestConfigWarning
            foobar=1
        """
        )
        result = pytester.runpytest()
        result.stdout.no_fnmatch_line("*PytestConfigWarning*")
Unknown config key warnings can be silenced using filterwarnings (#7620)
testing/test_config.py