pytest.py 452 B

1234567891011121314151617181920
  1. """QMK Python Unit Tests
  2. QMK script to run unit and integration tests against our python code.
  3. """
  4. import sys
  5. from milc import cli
  6. @cli.subcommand('QMK Python Unit Tests')
  7. def pytest(cli):
  8. """Use nose2 to run unittests
  9. """
  10. try:
  11. import nose2
  12. except ImportError:
  13. cli.log.error('Could not import nose2! Please install it with {fg_cyan}pip3 install nose2')
  14. return False
  15. nose2.discover(argv=['nose2', '-v'])