

def paired_tests(paired_test, options, test_labels):
    state = setup(int(options.verbosity), test_labels)
    if (not test_labels):
        print('')
        from django.db.models.loading import get_apps
        test_labels = [app.__name__.split('.')[(- 2)] for app in get_apps()]
    print('***** Trying paired execution')
    for label in [paired_test, 'model_inheritance_same_model_name']:
        try:
            test_labels.remove(label)
        except ValueError:
            pass
    subprocess_args = [sys.executable, upath(__file__), ('--settings=%s' % options.settings)]
    if options.failfast:
        subprocess_args.append('--failfast')
    if options.verbosity:
        subprocess_args.append(('--verbosity=%s' % options.verbosity))
    if (not options.interactive):
        subprocess_args.append('--noinput')
    for (i, label) in enumerate(test_labels):
        print(('***** %d of %d: Check test pairing with %s' % ((i + 1), len(test_labels), label)))
        failures = subprocess.call((subprocess_args + [label, paired_test]))
        if failures:
            print(('***** Found problem pair with %s' % label))
            return
    print('***** No problem pair found')
    teardown(state)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/runtests.py paired_tests/original