Skip to content

Instantly share code, notes, and snippets.

@absent1706
Created March 13, 2017 19:58
Show Gist options
  • Save absent1706/263cd1b804ee839485d67df9e74fc84f to your computer and use it in GitHub Desktop.
Save absent1706/263cd1b804ee839485d67df9e74fc84f to your computer and use it in GitHub Desktop.
run all python tests (unittest discover) programmatically
import os
import unittest
loader = unittest.TestLoader()
tests = loader.discover(os.path.join(os.path.dirname(__file__),
'sqlalchemy_mixins'))
testRunner = unittest.runner.TextTestRunner()
testRunner.run(tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment