Ejemplo n.º 1
0
    def test_get_result_path(self):
        """Tests comrna result path"""

        c = comRNA(InputHandler='_input_as_lines')
        res = c(self.input)
        self.assertEqualItems(res.keys(),['StdOut','StdErr','ExitStatus'])
        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
Ejemplo n.º 2
0
    def test_get_result_path(self):
        """Tests comrna result path"""

        c = comRNA(InputHandler="_input_as_lines")
        res = c(self.input)
        self.assertEqualItems(res.keys(), ["StdOut", "StdErr", "ExitStatus"])
        self.assertEqual(res["ExitStatus"], 0)
        assert res["StdOut"] is not None
        res.cleanUp()
Ejemplo n.º 3
0
    def test_input_as_lines(self):
        """Test comrna input as lines"""

        c = comRNA(InputHandler='_input_as_lines')
        res = c(self.input)

        #Can't compare stdout since comRNA app controller uses tmp filenames
        #that are impossible to predict.
        self.assertEqual(res['ExitStatus'], 0)
        assert res['StdOut'] is not None
        res.cleanUp()
Ejemplo n.º 4
0
    def test_input_as_lines(self):
        """Test comrna input as lines"""

        c = comRNA(InputHandler='_input_as_lines')
        res = c(self.input)

        #Can't compare stdout since comRNA app controller uses tmp filenames
        #that are impossible to predict. 
        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
Ejemplo n.º 5
0
    def test_input_as_string(self):
        """Test comrna input as string"""

        c = comRNA()
        f = open('/tmp/single.fasta', 'w')
        txt = '\n'.join([str(i).strip('\n') for i in self.input])
        f.write(txt)
        f.close()
        res = c('/tmp/single.fasta')
        #Can't compare stdout since comRNA app controller uses tmp filenames
        #that are impossible to predict.
        self.assertEqual(res['ExitStatus'], 0)
        assert res['StdOut'] is not None
        res.cleanUp()
        remove('/tmp/single.fasta')
Ejemplo n.º 6
0
    def test_input_as_string(self):
        """Test comrna input as string"""

        c = comRNA()
        f = open('/tmp/single.fasta','w')
        txt = '\n'.join([str(i).strip('\n') for i in self.input])
        f.write(txt)
        f.close()
        res = c('/tmp/single.fasta')
        #Can't compare stdout since comRNA app controller uses tmp filenames
        #that are impossible to predict. 
        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
        remove('/tmp/single.fasta')
Ejemplo n.º 7
0
    def test_input_as_string(self):
        """Test comrna input as string"""

        c = comRNA()
        f = open("/tmp/single.fasta", "w")
        txt = "\n".join([str(i).strip("\n") for i in self.input])
        f.write(txt)
        f.close()
        res = c("/tmp/single.fasta")
        # Can't compare stdout since comRNA app controller uses tmp filenames
        # that are impossible to predict.
        self.assertEqual(res["ExitStatus"], 0)
        assert res["StdOut"] is not None
        res.cleanUp()
        remove("/tmp/single.fasta")