tractor/tests
Tyler Goodlet bad42734db Adjust ep-masking-suite for the real-use-case
Namely that the more common-and-pertinent case is when
a `@context`-ep-fn contains the `finally`-footgun but without
a surrounding embedded `tn` (which currently still requires its own
scope embedded `trionics.maybe_raise_from_masking_exc()`) which can't
be compensated-for by `._rpc._invoke()` easily. Instead the test is
composed where the `._invoke()`-internal `tn` is the machinery being
addressed in terms of masking user-code excs with `trio.Cancelled`.

Deats,
- rename the test -> `test_unmasked_remote_exc` to reflect what the
  runtime should actually be addressing/solving.
- drop the embedded `tn` from `sleep_n_chkpt_in_finally()` (for now)
  since that case can't currently easily be addressed without the user
  code using its own `trionics.maybe_raise_from_masking_exc()` inside
  the nursery scope.
- as such drop all `tn` related params/logic/usage from the ep.
- add in a `Cancelled` handler block which checks for RTE masking and
  always prints the occurrence loudly.

Follow up,
- obvi this suite will currently fail until the appropriate adjustment
  is made to `._rpc._invoke()` to do the unmasking; coming next.
- we probably still need a case with an embedded user `tn` where if
  the default strict-eg mode is used then a ctxc from the parent might
  cause a non-graceful `Context.cancel()` outcome?
 |_since the embedded user-`tn` will raise
   `ExceptionGroup[trio.Cancelled]` upward despite the parent nursery's
   scope being the canceller, or will a `collapse_eg()` inside the
   `._invoke()` scope handle this as well?
2025-06-15 19:38:34 -04:00
..
devx Prevent `test_breakpoint_hook_restored` subproc hangs 2025-06-11 21:42:02 -04:00
ipc Start a very basic ipc-server unit test suite 2025-06-11 20:49:52 -04:00
__init__.py Add `tests/__init__.py` for `.conftest` imports 2025-03-20 20:53:54 -04:00
conftest.py Type annot the `testdir` fixture 2025-06-11 21:42:02 -04:00
test_2way.py Move context-streaming operational tests into one mod 2021-12-06 16:45:44 -05:00
test_advanced_faults.py Handle unconsidered fault-edge cases for UDS 2025-04-06 22:06:42 -04:00
test_advanced_streaming.py Various test tweaks related to 3.13 egs 2025-03-27 13:38:47 -04:00
test_cancellation.py Various test tweaks related to 3.13 egs 2025-03-27 13:38:47 -04:00
test_child_manages_service_nursery.py Various test tweaks related to 3.13 egs 2025-03-27 13:38:47 -04:00
test_clustering.py Add (back) a `tractor._testing` sub-pkg 2025-03-16 15:28:28 -04:00
test_context_stream_semantics.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-06-12 23:16:29 -04:00
test_discovery.py Start protoyping multi-transport testing 2025-04-06 22:06:42 -04:00
test_docs_examples.py Trying to make full suite pass with uds 2025-04-06 22:02:24 -04:00
test_ext_types_msgspec.py Rename ext-types with `msgspec` suite module 2025-03-27 15:58:03 -04:00
test_infected_asyncio.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-06-11 21:41:59 -04:00
test_inter_peer_cancellation.py Finally switch to using address protocol in all runtime 2025-04-06 22:02:18 -04:00
test_legacy_one_way_streaming.py Reapply "Port all tests to new `reg_addr` fixture name" 2025-03-20 19:50:31 -04:00
test_local.py Finally switch to using address protocol in all runtime 2025-04-06 22:02:18 -04:00
test_multi_program.py Finally switch to using address protocol in all runtime 2025-04-06 22:02:18 -04:00
test_pldrx_limiting.py Update `MsgTypeError` content matching to latest 2025-03-24 14:04:52 -04:00
test_pubsub.py Reapply "Port all tests to new `reg_addr` fixture name" 2025-03-20 19:50:31 -04:00
test_remote_exc_relay.py Adjust ep-masking-suite for the real-use-case 2025-06-15 19:38:34 -04:00
test_resource_cache.py Improve bit of tooling for `test_resource_cache.py` 2025-04-11 01:12:34 -04:00
test_ringbuf.py Move concrete `Address`es to each tpt module 2025-04-08 10:09:52 -04:00
test_root_infect_asyncio.py Be extra sure to re-raise EoCs from translator 2025-03-27 13:24:25 -04:00
test_root_runtime.py Add a `debug_mode`-state reversion test 2025-06-11 21:35:59 -04:00
test_rpc.py Adjust all `RemoteActorError.type` using tests 2025-03-20 20:35:02 -04:00
test_runtime.py Drop now-deprecated deps on modern `trio`/Python 2025-03-16 16:06:24 -04:00
test_shm.py Move tractor._shm to tractor.ipc._shm 2025-03-27 20:36:45 -03:00
test_spawning.py Move peer-tracking attrs from `Actor` -> `IPCServer` 2025-04-11 18:11:35 -04:00
test_task_broadcasting.py Use `collapse_eg()` in broadcaster suite 2025-03-27 13:38:47 -04:00
test_trioisms.py Mv `maybe_raise_from_masking_exc()` to `.trionics` 2025-06-15 13:29:34 -04:00