'L{Twist.run} runs the runner with arguments corresponding to the given
options.'

def test_run(self):

    argsSeen = []
    self.patch(Runner, '__init__', (lambda self, **args: argsSeen.append(args)))
    self.patch(Runner, 'run', (lambda self: None))
    twistOptions = Twist.options(['twist', '--reactor=default', '--log-format=json', 'web'])
    Twist.run(twistOptions)
    self.assertEqual(len(argsSeen), 1)
    self.assertEqual(argsSeen[0], dict(reactor=self.installedReactors['default'], defaultLogLevel=LogLevel.info, logFile=stdout, fileLogObserverFactory=jsonFileLogObserver))
