cpython/Lib/test/support
Cody Maloney c0264fc57c
gh-127747: Resolve BytesWarning in test.support.strace_helper (#127849)
The strace_helper code has a _make_error function to simplify making
StraceResult objects in error cases. That takes a details parameter
which is either a caught OSError or `bytes`. If it's bytes, _make_error
would implicitly coerce that to a str inside of a f-string, resulting in
 a BytesWarning.

It's useful to see if it's an OSError or bytes when debugging, resolve
by changing to format with repr().

This is an error message on an internal helper.

A non-zero exit code occurs if the strace binary isn't found, and no
events will be parsed in that case (there is no output). Handle that
case by checking exit code before checking for events.

Still asserting around events rather than returning false, so that
hopefully if there's some change to `strace` that breaks the parsing,
will see that as a test failure rather than silently loosing strace
tests because they are auto-disabled.
2024-12-13 23:36:47 -08:00
..
_hypothesis_stubs
interpreters
__init__.py gh-127146: Emscripten: Skip segfaults in test suite (#127151) 2024-12-05 08:26:25 +08:00
ast_helper.py
asynchat.py Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
asyncore.py Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
bytecode_helper.py Fix typos in comments and test code (#122846) 2024-08-11 21:16:41 -07:00
hashlib_helper.py
hypothesis_helper.py
i18n_helper.py gh-126413: Add translation tests for getopt and optparse (GH-126698) 2024-11-12 00:16:39 +02:00
import_helper.py gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) 2024-10-01 16:05:17 +00:00
logging_helper.py
os_helper.py gh-118201: Simplify conv_confname (#126089) 2024-11-19 10:42:19 -05:00
pty_helper.py
refleak_helper.py
script_helper.py gh-124188: Fix PyErr_ProgramTextObject() (GH-124189) 2024-09-24 11:01:37 +03:00
smtpd.py
socket_helper.py
strace_helper.py gh-127747: Resolve BytesWarning in test.support.strace_helper (#127849) 2024-12-13 23:36:47 -08:00
testcase.py gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071) 2024-09-08 16:01:54 +03:00
threading_helper.py
venv.py GH-126789: fix some sysconfig data on late site initializations 2024-11-17 00:07:25 +00:00
warnings_helper.py