Stefan Fuhrmann <stef...@apache.org> writes:

>    TestHarness._run_test):  The log is binary data, so write byte strings
>                             to it.

[...]

>      if self.opts.list_tests:
> -      log.write('LISTING: %s\n' % progbase)
> +      log.write(('LISTING: %s\n' % progbase).encode())
>      else:
> -      log.write('START: %s\n' % progbase)
> +      log.write(('START: %s\n' % progbase).encode())

Hm, do these log.write() calls always expect bytes?  I see that `log'
can be set to two different values, as per run_tests.py:880:

    if self.log:
      log = self.log
    else:
      log = sys.stdout  # with --log-to-stdout

And sys.stdout.write() works with strings, so this probably won't work
if tests are run with the --log-to-stdout option.


Regards,
Evgeny Kotkov

Reply via email to