Files
zsa_qmk_firmware/lib/python/qmk/cli/pytest.py
T

17 lines
463 B
Python
Raw Normal View History

2019-08-21 23:40:24 -07:00
"""QMK Python Unit Tests
QMK script to run unit and integration tests against our python code.
"""
import subprocess
2019-08-21 23:40:24 -07:00
from milc import cli
2019-11-27 21:27:06 +01:00
@cli.subcommand('QMK Python Unit Tests', hidden=False if cli.config.user.developer else True)
2019-09-22 13:25:33 -07:00
def pytest(cli):
"""Run several linting/testing commands.
2019-08-21 23:40:24 -07:00
"""
flake8 = subprocess.run(['flake8', 'lib/python', 'bin/qmk'])
nose2 = subprocess.run(['nose2', '-v'])
return flake8.returncode | nose2.returncode