summaryrefslogtreecommitdiff
path: root/tests/test_pylint_runners.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-11-19 22:47:24 +0100
committerGitHub <noreply@github.com>2022-11-19 22:47:24 +0100
commitb2462c91917bdf06db8708fb2999843f809909ff (patch)
treead16ffe1588aeb09fb5f2c9cc33a0d9f607f8b3c /tests/test_pylint_runners.py
parent88119920a1fb349bc3deaaadbc91e4be1c551e83 (diff)
downloadpylint-git-b2462c91917bdf06db8708fb2999843f809909ff.tar.gz
Deprecation following the separation of emacs related file to https://github.com/emacsorphanage/pylint (#7783)
Co-authored-by: Jonas Bernoulli <jonas@bernoul.li> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Diffstat (limited to 'tests/test_pylint_runners.py')
-rw-r--r--tests/test_pylint_runners.py30
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/test_pylint_runners.py b/tests/test_pylint_runners.py
index 8e68f8eaa..8d6930535 100644
--- a/tests/test_pylint_runners.py
+++ b/tests/test_pylint_runners.py
@@ -33,9 +33,7 @@ class _RunCallable(Protocol): # pylint: disable=too-few-public-methods
...
-@pytest.mark.parametrize(
- "runner", [run_epylint, run_pylint, run_pyreverse, run_symilar]
-)
+@pytest.mark.parametrize("runner", [run_pylint, run_pyreverse, run_symilar])
def test_runner(runner: _RunCallable, tmpdir: LocalPath) -> None:
filepath = os.path.abspath(__file__)
testargs = ["", filepath]
@@ -46,9 +44,18 @@ def test_runner(runner: _RunCallable, tmpdir: LocalPath) -> None:
assert err.value.code == 0
-@pytest.mark.parametrize(
- "runner", [run_epylint, run_pylint, run_pyreverse, run_symilar]
-)
+def test_epylint(tmpdir: LocalPath) -> None:
+ """TODO: 3.0 delete with epylint."""
+ filepath = os.path.abspath(__file__)
+ with tmpdir.as_cwd():
+ with patch.object(sys, "argv", ["", filepath]):
+ with pytest.raises(SystemExit) as err:
+ with pytest.warns(DeprecationWarning):
+ run_epylint()
+ assert err.value.code == 0
+
+
+@pytest.mark.parametrize("runner", [run_pylint, run_pyreverse, run_symilar])
def test_runner_with_arguments(runner: _RunCallable, tmpdir: LocalPath) -> None:
"""Check the runners with arguments as parameter instead of sys.argv."""
filepath = os.path.abspath(__file__)
@@ -59,6 +66,17 @@ def test_runner_with_arguments(runner: _RunCallable, tmpdir: LocalPath) -> None:
assert err.value.code == 0
+def test_epylint_with_arguments(tmpdir: LocalPath) -> None:
+ """TODO: 3.0 delete with epylint."""
+ filepath = os.path.abspath(__file__)
+ testargs = [filepath]
+ with tmpdir.as_cwd():
+ with pytest.raises(SystemExit) as err:
+ with pytest.warns(DeprecationWarning):
+ run_epylint(testargs)
+ assert err.value.code == 0
+
+
def test_pylint_argument_deduplication(
tmpdir: LocalPath, tests_directory: pathlib.Path
) -> None: