Skip to content

Commit

Permalink
Add test that runs pylint
Browse files Browse the repository at this point in the history
This shall uncover some hidden error, like non thread safe checks during multiprocess execution
  • Loading branch information
Anis Da Silva Campos committed Dec 23, 2023
1 parent b2e0d26 commit d7d4444
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/test_pylint_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""
The tests in this file shall detect any error related to actual execution of pylint, while the
other test are more unit tests that focuses on the checkers behaviour.
Notes:
Tests here are voluntarily minimalistic, the goal is not to test pylint, it is only checking
that pylint_pytest integrates just fine
"""
import subprocess


def test_simple_process():
result = subprocess.run(
["pylint", "--load-plugins", "pylint_pytest", "tests"],
capture_output=True,
check=False,
)
# then no error
assert not result.stderr


def test_multi_process():
result = subprocess.run(
["pylint", "--load-plugins", "pylint_pytest", "-j", "2", "tests"],
capture_output=True,
check=False,
)
# then no error
assert not result.stderr

0 comments on commit d7d4444

Please sign in to comment.