Use `.cancel_called` over deprecated `ActorNursery.cancelled`

`tests.test_cancellation` asserted on `ActorNursery.cancelled`,
which now warns + redirects to `.cancel_called`. Swap to the
non-deprecated property so the suite stops tripping its own
`DeprecationWarning`.

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
wkt/rm_test_warnings
Gud Boi 2026-06-25 17:32:54 -04:00
parent c4dee6ab4b
commit 725c4ef212
1 changed files with 2 additions and 2 deletions

View File

@ -351,7 +351,7 @@ async def test_cancel_infinite_streamer(
# we support trio's cancellation system # we support trio's cancellation system
assert cancel_scope.cancelled_caught assert cancel_scope.cancelled_caught
assert n.cancelled assert n.cancel_called
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -465,7 +465,7 @@ async def test_some_cancels_all(
elif isinstance(err, tractor.RemoteActorError): elif isinstance(err, tractor.RemoteActorError):
assert err.boxed_type == err_type assert err.boxed_type == err_type
assert an.cancelled is True assert an.cancel_called is True
assert not an._children assert not an._children
else: else:
pytest.fail("Should have gotten a remote assertion error?") pytest.fail("Should have gotten a remote assertion error?")