Skip to content

Instantly share code, notes, and snippets.

@archie
Created February 26, 2013 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save archie/5037989 to your computer and use it in GitHub Desktop.
Save archie/5037989 to your computer and use it in GitHub Desktop.
Illustrating how to load (through discovery) Python unit tests and executing them.
def test_project(self, projectname):
logging.info('Running tests on: %s' % projectname)
loader = unittest.TestLoader()
tests = loader.discover(projectname)
runner = unittest.TextTestRunner()
runner.run(tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment