forked from goodboy/tractor
3aa964315a
Though the runtime hasn't been changed over in this patch (it was in the local index at the time however), the test does now demonstrate that using a `Started` the correctly typed `.pld` will codec correctly when passed manually to `MsgCodec.encode/decode()`. Despite not having the runtime ported to the new shuttle msg set (meaning the mentioned test will fail without the runtime port patch), I was able to get this first original test working that limits payload packets as a `Msg.pld: NamespacePath`this as long as we spec `enc/dec_hook()`s then the `Msg.pld` will be processed correctly as per: https://jcristharif.com/msgspec/extending.html#mapping-to-from-native-types in both the `Any` and `NamespacePath|None` spec cases. ^- turns out in this case -^ that the codec hooks only get invoked on the unknown-fields NOT the entire `Struct`-msg. A further gotcha was merging a `|None` into the `pld_spec` since this test spawns a subactor and opens a context via `send_back_nsp()` and that func has no explicit `return` - so of course it delivers a `Return(pld=None)` which will fail if we only spec `NamespacePath`. |
||
---|---|---|
.. | ||
conftest.py | ||
test_2way.py | ||
test_advanced_faults.py | ||
test_advanced_streaming.py | ||
test_cancellation.py | ||
test_caps_based_msging.py | ||
test_child_manages_service_nursery.py | ||
test_clustering.py | ||
test_context_stream_semantics.py | ||
test_debugger.py | ||
test_discovery.py | ||
test_docs_examples.py | ||
test_infected_asyncio.py | ||
test_inter_peer_cancellation.py | ||
test_legacy_one_way_streaming.py | ||
test_local.py | ||
test_multi_program.py | ||
test_pubsub.py | ||
test_resource_cache.py | ||
test_rpc.py | ||
test_runtime.py | ||
test_shm.py | ||
test_spawning.py | ||
test_task_broadcasting.py | ||
test_trioisms.py |