def testError(self):
        """
        Test that an error in the batch file stops running the batch.
        """
        cmds = """chown 0 missingFile
pwd
exit
"""

        def _cbCheckResult(res):
            self.assertNotIn(self.testDir.asBytesMode().path, res)

        d = self._getBatchOutput(cmds)
        d.addCallback(_cbCheckResult)
        return d

        Test that an error in the batch file stops running the batch.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_cftp.py