diff --git a/mayan/apps/common/management/commands/runtests.py b/mayan/apps/common/management/commands/runtests.py index 787155f06c..16766a195d 100644 --- a/mayan/apps/common/management/commands/runtests.py +++ b/mayan/apps/common/management/commands/runtests.py @@ -15,6 +15,11 @@ class Command(management.BaseCommand): default=False, help='Don\'t use migrations when creating the test database.' ), + make_option( + '--reverse', action='store_true', dest='reverse', + default=False, + help='Reverses test cases order.' + ), ) def handle(self, *args, **options): @@ -22,6 +27,9 @@ class Command(management.BaseCommand): if options.get('nomigrations'): kwargs['nomigrations'] = True + if options.get('reverse'): + kwargs['reverse'] = True + test_apps = [app.name for app in apps.apps.get_app_configs() if getattr(app, 'test', False)] print 'Testing: {}'.format(', '.join(test_apps))