diff --git a/pyproject.toml b/pyproject.toml index 9c1dc816..1374186d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ dev = [ {include-group = 'devx'}, {include-group = 'testing'}, {include-group = 'repl'}, + {include-group = 'sync_pause'}, ] devx = [ # `tractor.devx` tooling diff --git a/tests/devx/conftest.py b/tests/devx/conftest.py index c62dc4a1..3414d113 100644 --- a/tests/devx/conftest.py +++ b/tests/devx/conftest.py @@ -4,6 +4,7 @@ ''' from __future__ import annotations import platform +import os import signal import time from typing import ( @@ -90,7 +91,6 @@ def spawn( https://docs.python.org/3/using/cmdline.html#using-on-controlling-color ''' - import os # disable colored tbs os.environ['PYTHON_COLORS'] = '0' # disable all ANSI color output @@ -104,7 +104,6 @@ def spawn( without requiring per-script CLI plumbing. ''' - import os os.environ['TRACTOR_SPAWN_METHOD'] = start_method def set_loglevel(): @@ -116,7 +115,6 @@ def spawn( the test harness without per-script edits. ''' - import os if loglevel: os.environ['TRACTOR_LOGLEVEL'] = loglevel else: @@ -176,13 +174,11 @@ def spawn( if ptyproc.isalive(): ptyproc.kill(signal.SIGKILL) - # Scope our env-var mutations to this single fixture - # invocation — both `TRACTOR_SPAWN_METHOD` and - # `TRACTOR_LOGLEVEL` are honored by - # `tractor._root.open_root_actor()` so leaking them past - # this test could inadvertently re-route a later - # in-process tractor test's spawn-backend / loglevel. - import os + # Scope our env-var mutations to this single fixture invocation + # — both `TRACTOR_SPAWN_METHOD` and `TRACTOR_LOGLEVEL` are + # honored by `tractor._root.open_root_actor()` so leaking them + # past this test could inadvertently re-route a later in-process + # tractor test's spawn-backend / loglevel. os.environ.pop('TRACTOR_SPAWN_METHOD', None) os.environ.pop('TRACTOR_LOGLEVEL', None) diff --git a/tests/devx/test_debugger.py b/tests/devx/test_debugger.py index d5fd759b..34f1b6ba 100644 --- a/tests/devx/test_debugger.py +++ b/tests/devx/test_debugger.py @@ -841,7 +841,7 @@ def test_multi_nested_subactors_error_through_nurseries( ) -@pytest.mark.timeout(15) +# @pytest.mark.timeout(15) @has_nested_actors def test_root_nursery_cancels_before_child_releases_tty_lock( spawn, diff --git a/tests/discovery/test_registrar.py b/tests/discovery/test_registrar.py index d7fa15c2..ef061f3c 100644 --- a/tests/discovery/test_registrar.py +++ b/tests/discovery/test_registrar.py @@ -535,13 +535,13 @@ async def kill_transport( # At timeout the plugin hard-kills the pytest process — that's # the intended behavior here; the alternative is an unattended # suite run that never returns. -@pytest.mark.timeout( - 30, - # NOTE should be a 2.1s happy path. - # XXX for `main_thread_forkserver` this is SUPER SENSITIVE - # so keep it higher to avoid flaky runs.. - method='thread', -) +# @pytest.mark.timeout( +# 30, +# # NOTE should be a 2.1s happy path. +# # XXX for `main_thread_forkserver` this is SUPER SENSITIVE +# # so keep it higher to avoid flaky runs.. +# method='thread', +# ) @pytest.mark.skipon_spawn_backend( 'subint', # 'main_thread_forkserver', diff --git a/tests/test_advanced_streaming.py b/tests/test_advanced_streaming.py index d4b206f1..645d2759 100644 --- a/tests/test_advanced_streaming.py +++ b/tests/test_advanced_streaming.py @@ -430,10 +430,10 @@ async def inf_streamer( print('streamer exited .open_streamer() block') -@pytest.mark.timeout( - 6, - method='signal', -) +# @pytest.mark.timeout( +# 6, +# method='signal', +# ) def test_local_task_fanout_from_stream( reg_addr: tuple, debug_mode: bool, diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 28168fd6..af1ae51d 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -458,10 +458,10 @@ async def spawn_and_error( # `test_nested_multierrors`. See # `ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md` # / #449 for the post-mortem. -@pytest.mark.timeout( - 10, - method='thread', -) +# @pytest.mark.timeout( +# 10, +# method='thread', +# ) @tractor_test async def test_nested_multierrors( reg_addr: tuple,