diff --git a/tests/devx/conftest.py b/tests/devx/conftest.py index 30393c92..9a5c90a5 100644 --- a/tests/devx/conftest.py +++ b/tests/devx/conftest.py @@ -2,6 +2,7 @@ `tractor.devx.*` tooling sub-pkg test space. ''' +from __future__ import annotations import time from typing import ( Callable, diff --git a/tests/devx/test_tooling.py b/tests/devx/test_tooling.py index 2debe3f7..c1bb8692 100644 --- a/tests/devx/test_tooling.py +++ b/tests/devx/test_tooling.py @@ -13,9 +13,13 @@ TODO: when debugging a problem inside the stack vs. in their app. ''' +from __future__ import annotations import os import signal import time +from typing import ( + TYPE_CHECKING, +) from .conftest import ( expect, @@ -29,9 +33,12 @@ from pexpect.exceptions import ( EOF, ) +if TYPE_CHECKING: + from ..conftest import PexpectSpawner + def test_shield_pause( - spawn, + spawn: PexpectSpawner, ): ''' Verify the `tractor.pause()/.post_mortem()` API works inside an @@ -126,7 +133,7 @@ def test_shield_pause( def test_breakpoint_hook_restored( - spawn, + spawn: PexpectSpawner, ): ''' Ensures our actor runtime sets a custom `breakpoint()` hook @@ -140,16 +147,22 @@ def test_breakpoint_hook_restored( child = spawn('restore_builtin_breakpoint') child.expect(PROMPT) - assert_before( - child, - [ - _pause_msg, - "