Skip to content

Commit 3356e5e

Browse files
authored
Fix pylint-config help output test for Python 3.14 (#10386)
1 parent 0e406c1 commit 3356e5e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pylint/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
PY310_PLUS = sys.version_info[:2] >= (3, 10)
1818
PY311_PLUS = sys.version_info[:2] >= (3, 11)
1919
PY312_PLUS = sys.version_info[:2] >= (3, 12)
20+
PY314_PLUS = sys.version_info[:2] >= (3, 14)
2021

2122
IS_PYPY = platform.python_implementation() == "PyPy"
2223

tests/config/pylint_config/test_pylint_config_help.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import pytest
1111
from pytest import CaptureFixture
1212

13+
from pylint.constants import PY314_PLUS
1314
from pylint.lint.run import _PylintConfigRun as Run
1415

1516

@@ -29,7 +30,10 @@ def test_pylint_config_main_messages(capsys: CaptureFixture[str]) -> None:
2930
with pytest.raises(SystemExit):
3031
Run(["generate", "-h"])
3132
captured = capsys.readouterr()
32-
assert captured.out.startswith("usage: pylint-config [options] generate")
33+
if PY314_PLUS:
34+
assert captured.out.startswith("usage: pylint-config generate")
35+
else:
36+
assert captured.out.startswith("usage: pylint-config [options] generate")
3337
assert "--interactive" in captured.out
3438

3539
with pytest.raises(SystemExit) as ex:

0 commit comments

Comments
 (0)