def testRunFailTimeOut(self): p = PythonScriptLauncher() p.sendCommand(self.tmpfile, 0.1) self.assertFalse(p.globalVariables.has_key('a')) self.assertEqual(p.localVariables['a'],1) self.assertFalse(p.localVariables.has_key('b')) out = p.readOutput() self.assertEqual(out,None)
def testRunSuccess(self): p = PythonScriptLauncher() p.sendCommand(self.tmpfile, 4) self.assertFalse(p.globalVariables.has_key('a')) self.assertEqual(p.localVariables['a'],1) self.assertEqual(p.localVariables['b'],2) out = p.readOutput() self.assertEqual(out,'Starting...\nFinishing...\n')