def test_run(self):
        """
        L{Twist.run} runs the runner with arguments corresponding to the given
        options.
        """
        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,
            )
        )

        L{Twist.run} runs the runner with arguments corresponding to the given
        options.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/twist/test/test_twist.py