def test_shown_by_default(self, pytester: Pytester, customize_filters) -> None:
        """Show deprecation warnings by default, even if user has customized the warnings filters (#4013)."""
        self.create_file(pytester)
        if customize_filters:
            pytester.makeini(
                """
                [pytest]
                filterwarnings =
                    once::UserWarning
            """
            )
        result = pytester.runpytest_subprocess()
        result.stdout.fnmatch_lines(
            [
                f"*== {WARNINGS_SUMMARY_HEADER} ==*",
                "*test_shown_by_default.py:3: DeprecationWarning: collection",
                "*test_shown_by_default.py:7: PendingDeprecationWarning: test run",
                "* 1 passed, 2 warnings*",
            ]
        )
Show deprecation warnings by default, even if user has customized the warnings filters (#4013).
testing/test_warnings.py