Skip to content

Commit 5006065

Browse files
Apply batched suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent c9cd047 commit 5006065

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎Lib/test/test_external_inspection.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def func():
772772
text=True,
773773
timeout=SHORT_TIMEOUT,
774774
)
775-
self.assertEqual(result.returncode, 0, result.stderr)
775+
self.assertEqual(result.returncode, 0, result)
776776
self.assertIn("<unknown function>", result.stdout)
777777

778778
@skip_if_not_supported

‎Modules/_testinternalcapi.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,12 +2060,12 @@ unicode_transformdecimalandspacetoascii(PyObject *self, PyObject *arg)
20602060
static PyObject *
20612061
new_invalid_str(PyObject *self, PyObject *Py_UNUSED(ignored))
20622062
{
2063-
PyObject *str = PyUnicode_New(2, 0x10FFFF);
2063+
PyObject *str = PyUnicode_New(2, _Py_MAX_UNICODE);
20642064
if (str == NULL) {
20652065
return NULL;
20662066
}
2067-
PyUnicode_4BYTE_DATA(str)[0] = 0x110000;
2068-
PyUnicode_4BYTE_DATA(str)[1] = 0x110000;
2067+
PyUnicode_4BYTE_DATA(str)[0] = _Py_MAX_UNICODE + 1;
2068+
PyUnicode_4BYTE_DATA(str)[1] = _Py_MAX_UNICODE + 2;
20692069
return str;
20702070
}
20712071

0 commit comments

Comments
 (0)