mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-115567: Catch test_ctypes.test_callbacks.test_i38748_stackCorruption stdout output (GH-115568) (GH-115609)
(cherry picked from commit 265548a4ea
)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
c726d1cc67
commit
6e89292f2c
1 changed files with 4 additions and 3 deletions
|
@ -151,9 +151,10 @@ class Callbacks(unittest.TestCase):
|
|||
print(f"a={a}, b={b}, c={c}")
|
||||
return c
|
||||
dll = cdll[_ctypes_test.__file__]
|
||||
with support.captured_stdout() as out:
|
||||
# With no fix for i38748, the next line will raise OSError and cause the test to fail.
|
||||
self.assertEqual(dll._test_i38748_runCallback(callback, 5, 10), 15)
|
||||
|
||||
self.assertEqual(out.getvalue(), "a=5, b=10, c=15\n")
|
||||
|
||||
@need_symbol('WINFUNCTYPE')
|
||||
class StdcallCallbacks(Callbacks):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue