Change `tractor.breakpoint()` to new `.pause()` in test suite

aio_abandons
Tyler Goodlet 2024-12-09 16:08:55 -05:00
parent 46ddc214cd
commit b875b35b98
9 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
''' '''
Fast fail test with a context. Fast fail test with a `Context`.
Ensure the partially initialized sub-actor process Ensure the partially initialized sub-actor process
doesn't cause a hang on error/cancel of the parent doesn't cause a hang on error/cancel of the parent

View File

@ -7,7 +7,7 @@ async def breakpoint_forever():
try: try:
while True: while True:
yield 'yo' yield 'yo'
await tractor.breakpoint() await tractor.pause()
except BaseException: except BaseException:
tractor.log.get_console_log().exception( tractor.log.get_console_log().exception(
'Cancelled while trying to enter pause point!' 'Cancelled while trying to enter pause point!'

View File

@ -10,7 +10,7 @@ async def name_error():
async def breakpoint_forever(): async def breakpoint_forever():
"Indefinitely re-enter debugger in child actor." "Indefinitely re-enter debugger in child actor."
while True: while True:
await tractor.breakpoint() await tractor.pause()
# NOTE: if the test never sent 'q'/'quit' commands # NOTE: if the test never sent 'q'/'quit' commands
# on the pdb repl, without this checkpoint line the # on the pdb repl, without this checkpoint line the

View File

@ -6,7 +6,7 @@ async def breakpoint_forever():
"Indefinitely re-enter debugger in child actor." "Indefinitely re-enter debugger in child actor."
while True: while True:
await trio.sleep(0.1) await trio.sleep(0.1)
await tractor.breakpoint() await tractor.pause()
async def name_error(): async def name_error():

View File

@ -10,7 +10,7 @@ async def main():
await trio.sleep(0.1) await trio.sleep(0.1)
await tractor.breakpoint() await tractor.pause()
await trio.sleep(0.1) await trio.sleep(0.1)

View File

@ -11,7 +11,7 @@ async def main(
# loglevel='runtime', # loglevel='runtime',
): ):
while True: while True:
await tractor.breakpoint() await tractor.pause()
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -4,9 +4,9 @@ import trio
async def gen(): async def gen():
yield 'yo' yield 'yo'
await tractor.breakpoint() await tractor.pause()
yield 'yo' yield 'yo'
await tractor.breakpoint() await tractor.pause()
@tractor.context @tractor.context
@ -15,7 +15,7 @@ async def just_bp(
) -> None: ) -> None:
await ctx.started() await ctx.started()
await tractor.breakpoint() await tractor.pause()
# TODO: bps and errors in this call.. # TODO: bps and errors in this call..
async for val in gen(): async for val in gen():

View File

@ -955,7 +955,7 @@ async def echo_back_sequence(
) )
await ctx.started() await ctx.started()
# await tractor.breakpoint() # await tractor.pause()
async with ctx.open_stream( async with ctx.open_stream(
msg_buffer_size=msg_buffer_size, msg_buffer_size=msg_buffer_size,

View File

@ -271,7 +271,7 @@ def test_faster_task_to_recv_is_cancelled_by_slower(
# the faster subtask was cancelled # the faster subtask was cancelled
break break
# await tractor.breakpoint() # await tractor.pause()
# await stream.receive() # await stream.receive()
print(f'final value: {value}') print(f'final value: {value}')