Created
April 11, 2016 02:03
-
-
Save stevommmm/c72a188541fa8dbd10557bb6fb7a4bd0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Module Attempted Failed | |
app.informant 10 0 | |
app.v1 0 0 | |
app.v1.backend_api 0 0 | |
app.v1.account_api 6 0 | |
app.v1.webhook_api 2 0 |
This file contains hidden or 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
#!/usr/bin/env python | |
import doctest | |
import operator | |
import pkgutil | |
import importlib | |
import app # Import our application for testing | |
print '''{0:<40}{1:<10}{2}'''.format('Module', 'Attempted', 'Failed') | |
for mod in map(importlib.import_module, map(operator.itemgetter(1), pkgutil.walk_packages(app.__path__, app.__name__ + '.'))): | |
print '''{0:<40}{1.attempted:<10}{1.failed}'''.format( | |
mod.__name__, | |
doctest.testmod(mod, report=True), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment