

@patch('twisted.internet.reactor')
@inlineCallbacks
def test_runner_no_run(self, fakereactor):
    fakereactor.connectTCP = Mock(side_effect=raise_error)
    runner = ApplicationRunner('ws://fake:1234/ws', 'dummy realm')
    try:
        (yield runner.run(raise_error, start_reactor=False))
        self.fail()
    except RuntimeError as e:
        self.assertEqual(e.args[0], 'we always fail')
    self.assertEqual(fakereactor.run.call_count, 0)
    self.assertEqual(fakereactor.stop.call_count, 0)

dataset/ETHPy150Open crossbario/autobahn-python/autobahn/twisted/test/test_application_runner.py TestApplicationRunner.test_runner_no_run/original