def test_override_ini_handled_asap(
        self, pytester: Pytester, with_ini: bool
    ) -> None:
        """-o should be handled as soon as possible and always override what's in ini files (#2238)"""
        if with_ini:
            pytester.makeini(
                """
                [pytest]
                python_files=test_*.py
            """
            )
        pytester.makepyfile(
            unittest_ini_handle="""
            def test():
                pass
        """
        )
        result = pytester.runpytest("--override-ini", "python_files=unittest_*.py")
        result.stdout.fnmatch_lines(["*1 passed in*"])
-o should be handled as soon as possible and always override what's in ini files (#2238)
testing/test_config.py