Пример #1
0
    def testOutputWithErrorIgnored(self):
        # make sure stderr raises an error normally
        exe = sys.executable
        scriptFile = self.makeSourceFile([
            'import sys',
            'sys.stderr.write("hello world\\n")'
            ])

        d = utils.getProcessOutput(exe, ['-u', scriptFile], errortoo=0)
        return assertions.assertFailure(d, IOError)
Пример #2
0
 def ranStupidChild(ign):
     d = defer.Deferred()
     f = FailedConnectionClientFactory(d)
     c = reactor.connectUNIX(self.filename, f, checkPID=True)
     return assertions.assertFailure(d, error.BadFileError)