Exemple #1
0
 def testCallErr(self):
     ex = None
     try:
         procOps.callProc(["false"])
     except Exception as ex:
         pass
     self.failUnless(isinstance(ex, Pipeline.ProcException))
     self.failUnlessEqual(str(ex), 'process exited 1: false')
Exemple #2
0
 def testCallSimple(self):
     out = procOps.callProc(["sort", self.getInputFile("simple1.txt")])
     self.failUnlessEqual(out, "five\nfour\none\nsix\nthree\ntwo")
Exemple #3
0
 def testQuotesCsh(self):
     # must use /bin/echo, as some csh echos expand backslash sequences
     for (words, expect) in self.testData:
         out = procOps.callProc(["csh", "-c", "/bin/echo " + " ".join(procOps.shQuote(words))])
         self.failUnlessEqual(out, expect)
Exemple #4
0
 def testQuotesBash(self):
     for (words, expect) in self.testData:
         out = procOps.callProc(["sh", "-c", "/bin/echo " + " ".join(procOps.shQuote(words))])
         self.failUnlessEqual(out, expect)
Exemple #5
0
 def testCallKeepNL(self):
     out = procOps.callProc(["sort", self.getInputFile("simple1.txt")], keepLastNewLine=True)
     self.failUnlessEqual(out, "five\nfour\none\nsix\nthree\ntwo\n")