Opened 2 years ago

Last modified 2 years ago

#5522 defect new

twisted.internet.test.reactormixins.ReactorBuilder.unbuildReactor uses many non-interface APIs of reactors

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: core Keywords: tests
Cc: Branch:
Author: Launchpad Bug:

Description

_uninstallHandler and disconnectAll are part of no interface, but ReactorBuilder tries to use them to clean up a reactor it just ran. It also uses getDelayedCalls without checking whether the reactor implements IReactorTime.

These uses lead to problems testing reactors that are missing one or more of these APIs.

Attachments (1)

unbuild-reactor.patch (2.1 KB) - added by exarkun 2 years ago.

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by exarkun

comment:1 Changed 2 years ago by exarkun

Attached a patch that makes these optional using a getattr trick, similar to one that's there already.

Of course, ultimately the real fix is to have reactors know how to clean up after themselves.

Note: See TracTickets for help on using tickets.