def test_main_uses_sysargv(self):
        class SpyOptions(usage.Options):
            def opt_hello(self, value):
                self.value = value

        class SpyScript(object):
            def main(self, reactor, arguments):
                self.reactor = reactor
                self.arguments = arguments
                return succeed(None)

        options = SpyOptions()
        script = SpyScript()
        sys = FakeSysModule(argv=[b"flocker", b"--hello", b"world"])
        # XXX: We shouldn't be using this private fake and Twisted probably
        # shouldn't either. See https://twistedmatrix.com/trac/ticket/6200 and
        # https://twistedmatrix.com/trac/ticket/7527
        from twisted.test.test_task import _FakeReactor
        fakeReactor = _FakeReactor()
        runner = FlockerScriptRunner(script, options,
                                     reactor=fakeReactor, sys_module=sys,
                                     logging=False)
        self.assertRaises(SystemExit, runner.main)
        self.assertEqual(b"world", script.arguments.value)
``FlockerScriptRunner.main`` uses ``self.sys_module.argv``.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/common/test/test_script.py/FlockerScriptRunnerMainTests.test_main_uses_sysargv