Skip to content

Conversation

@jelmer
Copy link
Member

@jelmer jelmer commented Dec 19, 2025

Fix issue where setUp/tearDown validation failed when using AsynchronousDeferredRunTest with Deferred-based async upcalls.

The validation logic now detects when setUp() or tearDown() returns a Deferred-like object (duck-typing via addBoth method) and defers the validation check until after the Deferred resolves. This allows patterns where super().setUp() or super().tearDown() is called asynchronously via callback chains.

For synchronous cases, validation continues to happen immediately as before.

Fixes #547

Fix issue where setUp/tearDown validation failed when using
AsynchronousDeferredRunTest with Deferred-based async upcalls.

The validation logic now detects when setUp() or tearDown() returns
a Deferred-like object (duck-typing via addBoth method) and defers
the validation check until after the Deferred resolves. This allows
patterns where super().setUp() or super().tearDown() is called
asynchronously via callback chains.

For synchronous cases, validation continues to happen immediately
as before.

Fixes #547
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.

Asynchronously supercalling setUp or tearDown fails

2 participants