Skip to content

Improve test logging to help reproduce an intermittent failure in asyncio hub #922

@itamarst

Description

@itamarst

FAILED tests/patcher_test.py::test_fork_after_monkey_patch - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaa in position 261961: invalid start byte happens sometimes in py38-asyncio runs. The result of this error is that the output doesn't get logged, so it's unclear what the root cause is.


            ok = lines[-1].rstrip() == b'pass'
            if not ok or len(lines) > 1:
>               sys.stderr.write('Program {} output:\n---\n{}\n---\n'.format(path, output.decode()))
E               UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaa in position 261961: invalid start byte

We should change the logging so it's more resilient to garbage, so we can diagnose the intermittent root issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions