mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
gh-115567: Catch test_ctypes.test_callbacks.test_i38748_stackCorruption stdout output (GH-115568)
This commit is contained in:
parent
04005f5021
commit
265548a4ea
|
@ -148,9 +148,10 @@ def callback(a, b):
|
|||
print(f"a={a}, b={b}, c={c}")
|
||||
return c
|
||||
dll = cdll[_ctypes_test.__file__]
|
||||
# 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)
|
||||
|
||||
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")
|
||||
|
||||
if hasattr(ctypes, 'WINFUNCTYPE'):
|
||||
class StdcallCallbacks(Callbacks):
|
||||
|
|
Loading…
Reference in a new issue