def test_processCommandLineArguments(self):
        """
        Arguments given to spawnProcess are passed to the child process as
        originally intended.
        """
        us = b"twisted.internet.test.process_cli"

        args = [b'hello', b'"', b' \t|<>^&', br'"\\"hello\\"', br'"foo\ bar baz\""']
        # Ensure that all non-NUL characters can be passed too.
        allChars = "".join(map(chr, range(1, 255)))
        if isinstance(allChars, unicode):
            allChars.encode("utf-8")

        reactor = self.buildReactor()

        def processFinished(finishedArgs):
            output, err, code = finishedArgs
            output = output.split(b'\0')
            # Drop the trailing \0.
            output.pop()
            self.assertEqual(args, output)

        def shutdown(result):
            reactor.stop()
            return result

        def spawnChild():
            d = succeed(None)
            d.addCallback(lambda dummy: utils.getProcessOutputAndValue(
                pyExe, [b"-m", us] + args, env=properEnv,
                reactor=reactor))
            d.addCallback(processFinished)
            d.addBoth(shutdown)

        reactor.callWhenRunning(spawnChild)
        self.runReactor(reactor)

        Arguments given to spawnProcess are passed to the child process as
        originally intended.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_process.py