Fixed using --pair with python's that aren't the system default, when not in the tests directory, and when using the global DJANGO_SETTINGS_MODULE env var.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
84291b7b84
commit
7505abf95d
|
@ -224,7 +224,7 @@ def bisect_tests(bisection_label, options, test_labels):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
subprocess_args = ['python','runtests.py', '--settings=%s' % options.settings]
|
subprocess_args = [sys.executable, __file__, '--settings=%s' % options.settings]
|
||||||
if options.failfast:
|
if options.failfast:
|
||||||
subprocess_args.append('--failfast')
|
subprocess_args.append('--failfast')
|
||||||
if options.verbosity:
|
if options.verbosity:
|
||||||
|
@ -284,7 +284,7 @@ def paired_tests(paired_test, options, test_labels):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
subprocess_args = ['python','runtests.py', '--settings=%s' % options.settings]
|
subprocess_args = [sys.executable, __file__, '--settings=%s' % options.settings]
|
||||||
if options.failfast:
|
if options.failfast:
|
||||||
subprocess_args.append('--failfast')
|
subprocess_args.append('--failfast')
|
||||||
if options.verbosity:
|
if options.verbosity:
|
||||||
|
@ -325,6 +325,8 @@ if __name__ == "__main__":
|
||||||
elif "DJANGO_SETTINGS_MODULE" not in os.environ:
|
elif "DJANGO_SETTINGS_MODULE" not in os.environ:
|
||||||
parser.error("DJANGO_SETTINGS_MODULE is not set in the environment. "
|
parser.error("DJANGO_SETTINGS_MODULE is not set in the environment. "
|
||||||
"Set it or use --settings.")
|
"Set it or use --settings.")
|
||||||
|
else:
|
||||||
|
options.settings = os.environ['DJANGO_SETTINGS_MODULE']
|
||||||
|
|
||||||
if options.bisect:
|
if options.bisect:
|
||||||
bisect_tests(options.bisect, options, args)
|
bisect_tests(options.bisect, options, args)
|
||||||
|
|
Loading…
Reference in New Issue