Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 7505abf95dbf901af704f485eb2180b37f8c5b16 1 parent 84291b7
Alex Gaynor authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  tests/runtests.py
6  tests/runtests.py
@@ -224,7 +224,7 @@ def bisect_tests(bisection_label, options, test_labels):
224 224
         except ValueError:
225 225
             pass
226 226
 
227  
-    subprocess_args = ['python','runtests.py', '--settings=%s' % options.settings]
  227
+    subprocess_args = [sys.executable, __file__, '--settings=%s' % options.settings]
228 228
     if options.failfast:
229 229
         subprocess_args.append('--failfast')
230 230
     if options.verbosity:
@@ -284,7 +284,7 @@ def paired_tests(paired_test, options, test_labels):
284 284
         except ValueError:
285 285
             pass
286 286
 
287  
-    subprocess_args = ['python','runtests.py', '--settings=%s' % options.settings]
  287
+    subprocess_args = [sys.executable, __file__, '--settings=%s' % options.settings]
288 288
     if options.failfast:
289 289
         subprocess_args.append('--failfast')
290 290
     if options.verbosity:
@@ -325,6 +325,8 @@ def paired_tests(paired_test, options, test_labels):
325 325
     elif "DJANGO_SETTINGS_MODULE" not in os.environ:
326 326
         parser.error("DJANGO_SETTINGS_MODULE is not set in the environment. "
327 327
                       "Set it or use --settings.")
  328
+    else:
  329
+        options.settings = os.environ['DJANGO_SETTINGS_MODULE']
328 330
 
329 331
     if options.bisect:
330 332
         bisect_tests(options.bisect, options, args)

0 notes on commit 7505abf

Please sign in to comment.
Something went wrong with that request. Please try again.