Skip to content

Commit a82e532

Browse files
author
Anis Da Silva Campos
committed
Add test that runs pylint
This shall uncover some hidden error, like non thread safe checks during multiprocess execution
1 parent 3987ae1 commit a82e532

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/test_pylint_integration.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""
2+
The tests in this file shall detect any error related to actual execution of pylint, while the
3+
other test are more unit tests that focuses on the checkers behaviour.
4+
5+
Notes:
6+
Tests here are voluntarily minimalistic, the goal is not to test pylint, it is only checking
7+
that pylint_pytest integrates just fine
8+
"""
9+
import subprocess
10+
11+
12+
def test_simple_process():
13+
result = subprocess.run(
14+
["pylint", "--load-plugins", "pylint_pytest", "tests"],
15+
capture_output=True,
16+
check=False,
17+
)
18+
# then no error
19+
assert not result.stderr
20+
21+
22+
def test_multi_process():
23+
result = subprocess.run(
24+
["pylint", "--load-plugins", "pylint_pytest", "-j", "2", "tests"],
25+
capture_output=True,
26+
check=False,
27+
)
28+
# then no error
29+
assert not result.stderr

0 commit comments

Comments
 (0)