Compare commits
4 Commits
408a74784e
...
a6058d14ae
Author | SHA1 | Date |
---|---|---|
Tyler Goodlet | a6058d14ae | |
Tyler Goodlet | 43a8cf4be1 | |
Tyler Goodlet | 6534a363a5 | |
Tyler Goodlet | 30d60379c1 |
|
@ -1,6 +1,5 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import time
|
import time
|
||||||
from threading import current_thread
|
|
||||||
|
|
||||||
import trio
|
import trio
|
||||||
import tractor
|
import tractor
|
||||||
|
@ -16,17 +15,9 @@ def sync_pause(
|
||||||
time.sleep(pre_sleep)
|
time.sleep(pre_sleep)
|
||||||
|
|
||||||
if use_builtin:
|
if use_builtin:
|
||||||
print(
|
|
||||||
f'Entering `breakpoint()` from\n'
|
|
||||||
f'{current_thread()}\n'
|
|
||||||
)
|
|
||||||
breakpoint(hide_tb=hide_tb)
|
breakpoint(hide_tb=hide_tb)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print(
|
|
||||||
f'Entering `tractor.pause_from_sync()` from\n'
|
|
||||||
f'{current_thread()}@{tractor.current_actor().uid}\n'
|
|
||||||
)
|
|
||||||
tractor.pause_from_sync()
|
tractor.pause_from_sync()
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
|
|
|
@ -12,11 +12,8 @@ TODO:
|
||||||
"""
|
"""
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import itertools
|
import itertools
|
||||||
# from os import path
|
|
||||||
from typing import Optional
|
|
||||||
import platform
|
import platform
|
||||||
import pathlib
|
import pathlib
|
||||||
# import sys
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -29,6 +26,7 @@ from pexpect.exceptions import (
|
||||||
from tractor.devx._debug import (
|
from tractor.devx._debug import (
|
||||||
_pause_msg,
|
_pause_msg,
|
||||||
_crash_msg,
|
_crash_msg,
|
||||||
|
_repl_fail_msg,
|
||||||
)
|
)
|
||||||
from tractor._testing import (
|
from tractor._testing import (
|
||||||
examples_dir,
|
examples_dir,
|
||||||
|
@ -293,7 +291,7 @@ def do_ctlc(
|
||||||
child,
|
child,
|
||||||
count: int = 3,
|
count: int = 3,
|
||||||
delay: float = 0.1,
|
delay: float = 0.1,
|
||||||
patt: Optional[str] = None,
|
patt: str|None = None,
|
||||||
|
|
||||||
# expect repl UX to reprint the prompt after every
|
# expect repl UX to reprint the prompt after every
|
||||||
# ctrl-c send.
|
# ctrl-c send.
|
||||||
|
@ -1306,7 +1304,7 @@ def test_shield_pause(
|
||||||
[
|
[
|
||||||
_crash_msg,
|
_crash_msg,
|
||||||
"('cancelled_before_pause'", # actor name
|
"('cancelled_before_pause'", # actor name
|
||||||
"Failed to engage debugger via `_pause()`",
|
_repl_fail_msg,
|
||||||
"trio.Cancelled",
|
"trio.Cancelled",
|
||||||
"raise Cancelled._create()",
|
"raise Cancelled._create()",
|
||||||
|
|
||||||
|
@ -1324,7 +1322,7 @@ def test_shield_pause(
|
||||||
[
|
[
|
||||||
_crash_msg,
|
_crash_msg,
|
||||||
"('root'", # actor name
|
"('root'", # actor name
|
||||||
"Failed to engage debugger via `_pause()`",
|
_repl_fail_msg,
|
||||||
"trio.Cancelled",
|
"trio.Cancelled",
|
||||||
"raise Cancelled._create()",
|
"raise Cancelled._create()",
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue