Skip to content

Conversation

@embano1
Copy link
Member

@embano1 embano1 commented Jan 16, 2026

Closes: #253

Issue #, if available:

Description of changes:

Update all examples and imports.

@yaythomas just not sure if we also need to fix

# Test wait method
mock_context.wait(10, name="test_wait")
mock_context.wait.assert_called_once_with(10, name="test_wait")
and why it's working?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Closes: aws#253
Signed-off-by: Michael Gasch <15986659+embano1@users.noreply.github.com>
@yaythomas
Copy link
Member

and why it's working?

Python type checking is at design time, not run-time, so it won't fail at runtime.

the reason mypy doesn't complain at design time, is because it's a Mock, not the actual object, and Mocks are very permissive with Any type. To test this, we'd have to add a concrete class that implements the DurableContext protocol rather than a mock.

these tests focus on testing that the method exist on the protocol - i.e that the Protocol defines a wait method with the expected parameter names.

@yaythomas yaythomas merged commit 93a1f53 into aws:main Jan 16, 2026
6 of 7 checks passed
@embano1 embano1 deleted the issue-253 branch January 19, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: unknown parameter seconds when calling context.wait

2 participants