Created
February 26, 2013 12:05
-
-
Save archie/5037989 to your computer and use it in GitHub Desktop.
Illustrating how to load (through discovery) Python unit tests and executing them.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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