'Trial reports a L{util.DirtyReactorAggregateError} if a test leaves
sockets behind.'

def test_leftoverSockets(self):

    suite = self.loader.loadByName('twisted.trial.test.erroneous.SocketOpenTest.test_socketsLeftOpen')
    suite.run(self.result)
    self.assertFalse(self.result.wasSuccessful())
    self.assertEqual(self.result.successes, 1)
    failure = self.result.errors[0][1]
    self.assertTrue(failure.check(util.DirtyReactorAggregateError))
