Skip to content

Instantly share code, notes, and snippets.

@stevommmm
Created April 11, 2016 02:03
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 stevommmm/c72a188541fa8dbd10557bb6fb7a4bd0 to your computer and use it in GitHub Desktop.
Save stevommmm/c72a188541fa8dbd10557bb6fb7a4bd0 to your computer and use it in GitHub Desktop.
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
#!/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