pylint-dev / pylint

It's not just a linter that annoys you!
https://pylint.readthedocs.io/en/latest/
GNU General Public License v2.0
5.33k stars 1.14k forks source link

Tests fail on maintenance/3.3.x #10009

Open jacobtylerwalls opened 1 month ago

jacobtylerwalls commented 1 month ago

Somehow fixme-in-docstring leaked into the 3.3.x branch?

___________________ TestCallbackOptions.test_generate_rcfile ___________________

tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_generate_rcfile0')

    @staticmethod
    def test_generate_rcfile(tmp_path: Path) -> None:
        """Test the --generate-rcfile flag."""
        args = _add_rcfile_default_pylintrc(["--generate-rcfile"])
        process = subprocess.run(
            [sys.executable, "-m", "pylint", *args],
            capture_output=True,
            encoding="utf-8",
            check=False,
            cwd=str(tmp_path),
        )
        assert "[MAIN]" in process.stdout
        assert "[MASTER]" not in process.stdout
        assert "profile" not in process.stdout
        args = _add_rcfile_default_pylintrc(["--generate-rcfile"])
        process_two = subprocess.run(
            [sys.executable, "-m", "pylint", *args],
            capture_output=True,
            encoding="utf-8",
            check=False,
            cwd=str(tmp_path),
        )
        assert process.stdout == process_two.stdout

        # Check that the generated file is valid
        with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp:
            filename = temp.name
            temp.write(process.stdout)
            runner = Run(
                [join(HERE, "regrtest_data", "empty.py"), f"--rcfile={filename}"],
                exit=False,
            )
>           assert not runner.linter.msg_status
E           AssertionError: assert not 2
E            +  where 2 = Checker 'main' (responsible for 'F0001', 'F0002', 'F0010', 'F0011', 'I0001', 'I0010', 'I0011', 'I0013', 'I0020', 'I0021', 'I0022', 'E0001', 'E0011', 'W0012', 'R0022', 'E0013', 'E0014', 'E0015').msg_status
E            +    where Checker 'main' (responsible for 'F0001', 'F0002', 'F0010', 'F0011', 'I0001', 'I0010', 'I0011', 'I0013', 'I0020', 'I0021', 'I0022', 'E0001', 'E0011', 'W0012', 'R0022', 'E0013', 'E0014', 'E0015') = <pylint.testutils._run._Run object at 0x7f2abbe2d630>.linter

tests/test_self.py:[146](https://github.com/pylint-dev/pylint/actions/runs/11216506980/job/31175953299#step:7:147)4: AssertionError
----------------------------- Captured stdout call -----------------------------
************* Module /tmp/tmpp35y9uob
/tmp/tmpp35y9uob:1:0: E0015: Unrecognized option found: check-fixme-in-docstring (unrecognized-option)
Pierre-Sassoulas commented 6 days ago

Doesn't seem to fail in https://github.com/pylint-dev/pylint/pull/10083 ?

Pierre-Sassoulas commented 5 days ago

It seems that indeed fixme-in-docstring leaked into the 3.3.x branch (seeing the generated example in #10088 )