def paired_tests(paired_test, options, test_labels):
    state = setup(int(options.verbosity), test_labels)

    if not test_labels:
        print ""
        # Get the full list of test labels to use for bisection
        from django.db.models.loading import get_apps
        test_labels = [app.__name__.split('.')[-2] for app in get_apps()]

    print '***** Trying paired execution'

    # Make sure the bisection point isn't in the test list
    # Also remove tests that need to be run in specific combinations
    for label in [paired_test, 'model_inheritance_same_model_name']:
        try:
            test_labels.remove(label)
        except __HOLE__:
            pass

    subprocess_args = ['python','runtests.py', '--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',label
            return

    print '***** No problem pair found'
    teardown(state)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/runtests.py/paired_tests