On 13.05.2016 00:00, Evgeny Kotkov wrote:
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.
That looks like a win-tests.py -only feature,
although run_tests.py has remnants of that.
If not, I'd have to add a wrapper around stdout.
Feel free to make the tests run on Windows
with Python 3. I for sure won't do anything
along those lines.
-- Stefan^2.