From a6058d14ae8be5d9de718be5dfcfac4fc399c837 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 10 Jun 2024 17:57:43 -0400 Subject: [PATCH] Use new `._debug._repl_fail_msg` inside `test_pause_from_sync` --- tests/test_debugger.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_debugger.py b/tests/test_debugger.py index 5f818a6..43dadbb 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -12,11 +12,8 @@ TODO: """ from functools import partial import itertools -# from os import path -from typing import Optional import platform import pathlib -# import sys import time import pytest @@ -29,6 +26,7 @@ from pexpect.exceptions import ( from tractor.devx._debug import ( _pause_msg, _crash_msg, + _repl_fail_msg, ) from tractor._testing import ( examples_dir, @@ -293,7 +291,7 @@ def do_ctlc( child, count: int = 3, delay: float = 0.1, - patt: Optional[str] = None, + patt: str|None = None, # expect repl UX to reprint the prompt after every # ctrl-c send. @@ -1306,7 +1304,7 @@ def test_shield_pause( [ _crash_msg, "('cancelled_before_pause'", # actor name - "Failed to engage debugger via `_pause()`", + _repl_fail_msg, "trio.Cancelled", "raise Cancelled._create()", @@ -1324,7 +1322,7 @@ def test_shield_pause( [ _crash_msg, "('root'", # actor name - "Failed to engage debugger via `_pause()`", + _repl_fail_msg, "trio.Cancelled", "raise Cancelled._create()",