You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
452 B
21 lines
452 B
5 years ago
|
"""QMK Python Unit Tests
|
||
|
|
||
|
QMK script to run unit and integration tests against our python code.
|
||
|
"""
|
||
5 years ago
|
import sys
|
||
5 years ago
|
from milc import cli
|
||
|
|
||
|
|
||
5 years ago
|
@cli.subcommand('QMK Python Unit Tests')
|
||
|
def pytest(cli):
|
||
5 years ago
|
"""Use nose2 to run unittests
|
||
|
"""
|
||
|
try:
|
||
|
import nose2
|
||
5 years ago
|
|
||
5 years ago
|
except ImportError:
|
||
|
cli.log.error('Could not import nose2! Please install it with {fg_cyan}pip3 install nose2')
|
||
|
return False
|
||
|
|
||
5 years ago
|
nose2.discover(argv=['nose2', '-v'])
|