Django

Code

Changeset 5914

Show
Ignore:
Timestamp:
08/17/07 07:29:08 (11 months ago)
Author:
mtredinnick
Message:

Made output for invalid model tests more consistent (removed colored output).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/runtests.py

    r5898 r5914  
    6161            self.fail('Unable to load invalid model module') 
    6262 
     63        # Make sure sys.stdout is not a tty so that we get errors without 
     64        # coloring attached (makes matching the results easier). We restore 
     65        # sys.stderr afterwards. 
     66        orig_stdout = sys.stdout 
    6367        s = StringIO() 
     68        sys.stdout = s 
    6469        count = get_validation_errors(s, module) 
     70        sys.stdout = orig_stdout 
    6571        s.seek(0) 
    6672        error_log = s.read()