2019-08-22 12:40:24 +06:00
|
|
|
"""QMK Python Unit Tests
|
|
|
|
|
|
|
|
QMK script to run unit and integration tests against our python code.
|
|
|
|
"""
|
2019-11-21 04:54:18 +06:00
|
|
|
import subprocess
|
|
|
|
|
2019-08-22 12:40:24 +06:00
|
|
|
from milc import cli
|
|
|
|
|
|
|
|
|
2019-09-23 02:25:33 +06:00
|
|
|
@cli.subcommand('QMK Python Unit Tests')
|
|
|
|
def pytest(cli):
|
2019-11-21 04:54:18 +06:00
|
|
|
"""Run several linting/testing commands.
|
2019-08-22 12:40:24 +06:00
|
|
|
"""
|
2019-11-21 04:54:18 +06:00
|
|
|
flake8 = subprocess.run(['flake8', 'lib/python', 'bin/qmk'])
|
|
|
|
nose2 = subprocess.run(['nose2', '-v'])
|
|
|
|
return flake8.returncode | nose2.returncode
|