Ticket #5522 defect new

Opened 16 months ago

Last modified 16 months ago

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

unbuild-reactor.patch Download (2.1 KB) - added by exarkun 16 months ago.

Change History

Changed 16 months ago by exarkun

1

Changed 16 months 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.