test/pylint: check error code instead of exception
Instead of using `subprocess` with `check=True`, which will echo the command used, including all the files it checked, check the error code and if non-zero, fail the test with a nice small error message.
This commit is contained in:
parent
cae23de605
commit
5c8d11ebe1
1 changed files with 3 additions and 1 deletions
|
|
@ -52,7 +52,9 @@ def test_pylint(source_files):
|
|||
# modules we have.
|
||||
#
|
||||
|
||||
subprocess.run(["pylint"] + source_files, check=True)
|
||||
r = subprocess.run(["pylint"] + source_files, check=False)
|
||||
if r.returncode != 0:
|
||||
pytest.fail("pylint issues detected")
|
||||
|
||||
|
||||
@pytest.mark.skipif(not test.TestBase.have_autopep8(), reason="autopep8 not available")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue