From c34e13e17c664ea43b85572428bcf74c7509db3f Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Mon, 20 Oct 2014 18:01:03 +0700 Subject: Fixed #23107 -- Made runserver output respect --no-color. This commit reverts 67d7da5fb9498b811f0168f5df2308ad4743027f. The previous fix changed the environment globally, which meant that any call to `call_command(no_color=True)` prevented further `call_command` with color. This fix still relies on the environment because it's currently the only way to reach WSGIRequestHandler, but it's now limited to the `runserver` command. This seems an acceptable compromise considering `runserver` runs indefinitely. Thanks Tim Graham for the review. --- tests/admin_scripts/tests.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/admin_scripts') diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index b5eeac713b..2b3f4824fd 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1397,7 +1397,6 @@ class CommandTypes(AdminScriptTestCase): out = StringIO() call_command('color_command', no_color=True, stdout=out) - self.assertEqual(os.environ.get('DJANGO_COLORS', ''), 'nocolor') self.assertEqual(out.getvalue(), 'BEGIN\n') def test_base_command(self): -- cgit v1.3