Skip to content

Check for junk in the main reactor in the tearDown of each test #287

@adiroiban

Description

@adiroiban

This is an issue I found in txacme..

There was a test not using AsynchronousDeferredRunTest but using the main reactor and it left the reactor dirty...

Then, another test was executed with AsynchronousDeferredRunTest and the main reactor. This test was fine, but test were still failing as it was now detecting that reactor is not clean.

I think that in twistedsuppor there should be a dedicated TestCase to check for junk at tearDown for the main reactor

Also, I think that besides delayedcalls, readers and writers and threads should also be considered junk

For my projects I am using a simplified TwistedTestCase on top of stdlib TestCase and here is the reactor cleanup check that I use:

https://github.com/chevah/compat/blob/master/chevah/compat/testing/testcase.py#L310

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions