mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #4460 -- Added the ability to be more specific in the test cases that are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -1331,16 +1331,11 @@ def runfcgi(args): | ||||
|     runfastcgi(args) | ||||
| runfcgi.args = '[various KEY=val options, use `runfcgi help` for help]' | ||||
|  | ||||
| def test(app_labels, verbosity=1, interactive=True): | ||||
| def test(test_labels, verbosity=1, interactive=True): | ||||
|     "Runs the test suite for the specified applications" | ||||
|     from django.conf import settings | ||||
|     from django.db.models import get_app, get_apps | ||||
|  | ||||
|     if len(app_labels) == 0: | ||||
|         app_list = get_apps() | ||||
|     else: | ||||
|         app_list = [get_app(app_label) for app_label in app_labels] | ||||
|  | ||||
|      | ||||
|     test_path = settings.TEST_RUNNER.split('.') | ||||
|     # Allow for Python 2.5 relative paths | ||||
|     if len(test_path) > 1: | ||||
| @@ -1350,7 +1345,7 @@ def test(app_labels, verbosity=1, interactive=True): | ||||
|     test_module = __import__(test_module_name, {}, {}, test_path[-1]) | ||||
|     test_runner = getattr(test_module, test_path[-1]) | ||||
|  | ||||
|     failures = test_runner(app_list, verbosity=verbosity, interactive=interactive) | ||||
|     failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive) | ||||
|     if failures: | ||||
|         sys.exit(failures) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user