~jfb-tempo-consulting/unifield-wm/sync-env-py3

« back to all changes in this revision

Viewing changes to unittest27/test/test_result.py

  • Committer: jf
  • Date: 2022-02-01 10:24:52 UTC
  • mfrom: (173.1.1 sync-env)
  • Revision ID: jfb@tempo-consulting.fr-20220201102452-rndr3uvmo030kqlf
[MERGE] US-9423: instance registration: do not validate an instance with no group on the sync server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import sys
2
2
import textwrap
3
 
from io import StringIO
 
3
from StringIO import StringIO
4
4
from test import test_support
5
5
 
6
6
import traceback
422
422
        result._original_stdout = StringIO()
423
423
        result._original_stderr = StringIO()
424
424
 
425
 
        print('foo')
426
 
        print('bar', file=sys.stderr)
 
425
        print 'foo'
 
426
        print >> sys.stderr, 'bar'
427
427
 
428
428
        self.assertEqual(out_stream.getvalue(), 'foo\n')
429
429
        self.assertEqual(err_stream.getvalue(), 'bar\n')
466
466
            result._original_stdout = StringIO()
467
467
            result._original_stderr = StringIO()
468
468
 
469
 
            print('foo', file=sys.stdout)
 
469
            print >> sys.stdout, 'foo'
470
470
            if include_error:
471
 
                print('bar', file=sys.stderr)
 
471
                print >> sys.stderr, 'bar'
472
472
 
473
473
 
474
474
            addFunction = getattr(result, add_attr)