コード例 #1
0
ファイル: ProcOpsTests.py プロジェクト: maximilianh/pubMunch
 def testRunErr(self):
     ex = None
     try:
         procOps.runProc(["false"], stdin=self.getInputFile("simple1.txt"))
     except Exception as ex:
         pass
     self.failUnless(isinstance(ex, Pipeline.ProcException))
     self.failUnlessEqual(str(ex), 'process exited 1: false')
コード例 #2
0
ファイル: PipelineTests.py プロジェクト: maximilianh/pubMunch
    def testRead(self):
        inf = self.getInputFile("simple1.txt")
        infGz = self.getOutputFile(".txt.gz")
        procOps.runProc(("gzip", "-c", inf), stdout=infGz)

        pl = Pipeline(("gzip", "-dc"), "r", otherEnd=infGz)
        self.cpPlToFile(pl, ".out")
        pl.wait()

        self.diffExpected(".out")
コード例 #3
0
    def testRead(self):
        inf = self.getInputFile("simple1.txt")
        infGz = self.getOutputFile(".txt.gz")
        procOps.runProc(("gzip", "-c", inf), stdout=infGz)

        pl = Pipeline(("gzip", "-dc"), "r", otherEnd=infGz)
        self.cpPlToFile(pl, ".out")
        pl.wait()

        self.diffExpected(".out")
コード例 #4
0
ファイル: PipelineTests.py プロジェクト: maximilianh/pubMunch
    def testWrite(self):
        outf = self.getOutputFile(".out")
        outfGz = self.getOutputFile(".out.gz")

        pl = Pipeline(("gzip", "-1"), "w", otherEnd=outfGz)
        self.cpFileToPl("simple1.txt", pl)
        pl.wait()

        procOps.runProc(("zcat", outfGz), stdout=outf)
        self.diffExpected(".out")
コード例 #5
0
    def testWrite(self):
        outf = self.getOutputFile(".out")
        outfGz = self.getOutputFile(".out.gz")

        pl = Pipeline(("gzip", "-1"), "w", otherEnd=outfGz)
        self.cpFileToPl("simple1.txt", pl)
        pl.wait()

        procOps.runProc(("zcat", outfGz), stdout=outf)
        self.diffExpected(".out")
コード例 #6
0
ファイル: PipelineTests.py プロジェクト: maximilianh/pubMunch
    def XXtestPassWrite(self):
        "using FIFO to pass pipe to another process for writing"
        # FIXME: should this be supported somehow
        inf = self.getInputFile("simple1.txt")
        outf = self.getOutputFile(".out")
        pipePath = self.getOutputFile(".fifo")

        pl = Pipeline(("sort", "-r"), "w", otherEnd=outf, pipePath=pipePath)
        procOps.runProc(["cat"],  stdin=inf, stdout=pl.pipePath)
        pl.wait()

        self.diffExpected(".out")
コード例 #7
0
    def XXtestPassWrite(self):
        "using FIFO to pass pipe to another process for writing"
        # FIXME: should this be supported somehow
        inf = self.getInputFile("simple1.txt")
        outf = self.getOutputFile(".out")
        pipePath = self.getOutputFile(".fifo")

        pl = Pipeline(("sort", "-r"), "w", otherEnd=outf, pipePath=pipePath)
        procOps.runProc(["cat"], stdin=inf, stdout=pl.pipePath)
        pl.wait()

        self.diffExpected(".out")
コード例 #8
0
ファイル: PipelineTests.py プロジェクト: maximilianh/pubMunch
    def XXtestPassRead(self):
        "using FIFO to pass pipe to another process for reading"
        # FIXME: should this be supported somehow
        inf = self.getInputFile("simple1.txt")
        infGz = self.getOutputFile(".txt.gz")
        cpOut = self.getOutputFile(".out")
        procOps.runProc(("gzip", "-c", inf), stdout=infGz)

        pl = Pipeline(("gzip", "-dc"), "r", otherEnd=infGz)
        procOps.runProc(["cat"],  stdin=pl.pipePath, stdout=cpOut)
        pl.wait()

        self.diffExpected(".out")
コード例 #9
0
    def XXtestPassRead(self):
        "using FIFO to pass pipe to another process for reading"
        # FIXME: should this be supported somehow
        inf = self.getInputFile("simple1.txt")
        infGz = self.getOutputFile(".txt.gz")
        cpOut = self.getOutputFile(".out")
        procOps.runProc(("gzip", "-c", inf), stdout=infGz)

        pl = Pipeline(("gzip", "-dc"), "r", otherEnd=infGz)
        procOps.runProc(["cat"], stdin=pl.pipePath, stdout=cpOut)
        pl.wait()

        self.diffExpected(".out")
コード例 #10
0
ファイル: ProcOpsTests.py プロジェクト: maximilianh/pubMunch
 def testRunInOut(self):
     outf = self.getOutputFile(".txt")
     ret = procOps.runProc(["sort"], stdin=self.getInputFile("simple1.txt"), stdout=outf)
     self.failUnlessEqual(ret, 0)
     self.diffExpected(".txt")
コード例 #11
0
ファイル: TSVTests.py プロジェクト: maximilianh/pubMunch
 def testReadBzip2(self):
     tsvBz = self.getOutputFile("tsv.bz2")
     procOps.runProc(["bzip2", "-c", self.getInputFile("mrna1.tsv")], stdout=tsvBz)
     self.readMRna1(tsvBz)
コード例 #12
0
ファイル: TSVTests.py プロジェクト: maximilianh/pubMunch
 def testReadGzip(self):
     tsvGz = self.getOutputFile("tsv.gz")
     procOps.runProc(["gzip", "-c", self.getInputFile("mrna1.tsv")], stdout=tsvGz)
     self.readMRna1(tsvGz)
コード例 #13
0
ファイル: TSVTests.py プロジェクト: maximilianh/pubMunch
 def testReadBzip2(self):
     tsvBz = self.getOutputFile("tsv.bz2")
     procOps.runProc(
         ["bzip2", "-c", self.getInputFile("mrna1.tsv")], stdout=tsvBz)
     self.readMRna1(tsvBz)
コード例 #14
0
ファイル: TSVTests.py プロジェクト: maximilianh/pubMunch
 def testReadGzip(self):
     tsvGz = self.getOutputFile("tsv.gz")
     procOps.runProc(
         ["gzip", "-c", self.getInputFile("mrna1.tsv")], stdout=tsvGz)
     self.readMRna1(tsvGz)