forked from PyCQA/pylint-pytest
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |