From c97b755a1cdd7051270de6ac2605a8a1e87555fb Mon Sep 17 00:00:00 2001 From: Collin Anderson Date: Thu, 10 Sep 2015 11:57:26 -0400 Subject: [PATCH] Refs #20461 -- Fixed parallel test runner on Python 2.7. textwrap.indent() is new in Python 3.3. --- django/test/runner.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/django/test/runner.py b/django/test/runner.py index 243ab714a4..8b4e328543 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -95,11 +95,9 @@ class RemoteTestResult(object): pickle.dumps(err) except Exception as exc: original_exc_txt = repr(err[1]) - original_exc_txt = textwrap.fill(original_exc_txt, 75) - original_exc_txt = textwrap.indent(original_exc_txt, ' ') + original_exc_txt = textwrap.fill(original_exc_txt, 75, initial_indent=' ', subsequent_indent=' ') pickle_exc_txt = repr(exc) - pickle_exc_txt = textwrap.fill(pickle_exc_txt, 75) - pickle_exc_txt = textwrap.indent(pickle_exc_txt, ' ') + pickle_exc_txt = textwrap.fill(pickle_exc_txt, 75, initial_indent=' ', subsequent_indent=' ') if tblib is None: print("""