Commits

Waldemar Kornewald committed 94a3e48

fixed capturing test runner when exceptions happen in init phase

  • Participants
  • Parent commits 7de661b

Comments (0)

Files changed (1)

djangotoolbox/test.py

         stderr = sys.stderr
 
         def extend_error(errors):
-            captured_stdout = sys.stdout.getvalue()
-            captured_stderr = sys.stderr.getvalue()
+            try:
+                captured_stdout = sys.stdout.getvalue()
+                captured_stderr = sys.stderr.getvalue()
+            except AttributeError:
+                captured_stdout = captured_stderr = ''
             sys.stdout = stdout
             sys.stderr = stderr
             t, e = errors[-1]