Created
March 19, 2011 09:11
-
-
Save liorsion/877356 to your computer and use it in GitHub Desktop.
Coverage testing to your apps only
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
| from django.core.management.base import AppCommand, BaseCommand | |
| from django.core.management import call_command | |
| from django.conf import settings | |
| class Command(BaseCommand): | |
| def handle(self, *args, **options): | |
| test_app_path = () | |
| for app in settings.MY_INSTALLED_APPS: | |
| test_app = app.split('.') | |
| if len(test_app) > 1: | |
| test_app = (test_app[-1],) | |
| else: | |
| test_app = (app,) | |
| test_app_path += test_app | |
| call_command("test_coverage",*test_app_path, **options) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment