Example #1
0
    def test_stdout_input_as_lines(self):
        """Test Unafold stdout input as lines"""

        u = hybrid_ss_min(InputHandler="_input_as_lines")
        exp = "\n".join(unafold_stdout)

        res = u(self.input)
        obs = res["StdOut"].read()
        self.assertEqual(obs, exp)
        self.assertEqual(res["ExitStatus"], 0)
        res.cleanUp()
Example #2
0
    def test_stdout_input_as_lines(self):
        """Test Unafold stdout input as lines"""

        u = hybrid_ss_min(InputHandler='_input_as_lines')
        exp = '\n'.join(unafold_stdout)

        res = u(self.input)
        obs = res['StdOut'].read()
        self.assertEqual(obs, exp)
        self.assertEqual(res['ExitStatus'], 0)
        res.cleanUp()
Example #3
0
    def test_stdout_input_as_lines(self):
        """Test Unafold stdout input as lines"""

        u = hybrid_ss_min(InputHandler='_input_as_lines')
        exp = '\n'.join(unafold_stdout)

        res = u(self.input)
        obs = res['StdOut'].read()
        self.assertEqual(obs,exp)
        self.assertEqual(res['ExitStatus'],0)
        res.cleanUp()
Example #4
0
    def test_get_result_path(self):
        """Tests unafold result path"""

        u = hybrid_ss_min(InputHandler="_input_as_lines")
        res = u(self.input)
        self.assertEqualItems(res.keys(), ["StdOut", "StdErr", "ExitStatus", "ct", "dG", "run", "plot_37", "ext_37"])
        self.assertEqual(res["ExitStatus"], 0)
        assert res["ct"] is not None
        assert res["dG"] is not None
        assert res["run"] is not None
        assert res["plot_37"] is not None
        assert res["ext_37"] is not None
        res.cleanUp()
Example #5
0
    def test_get_result_path(self):
        """Tests unafold result path"""

        u = hybrid_ss_min(InputHandler='_input_as_lines')
        res = u(self.input)
        self.assertEqualItems(res.keys(),['StdOut','StdErr','ExitStatus',\
        'ct','dG','run','plot_37','ext_37'])
        self.assertEqual(res['ExitStatus'], 0)
        assert res['ct'] is not None
        assert res['dG'] is not None
        assert res['run'] is not None
        assert res['plot_37'] is not None
        assert res['ext_37'] is not None
        res.cleanUp()
Example #6
0
    def test_get_result_path(self):
        """Tests unafold result path"""

        u = hybrid_ss_min(InputHandler='_input_as_lines')
        res = u(self.input)
        self.assertEqualItems(res.keys(),['StdOut','StdErr','ExitStatus',\
        'ct','dG','run','plot_37','ext_37'])
        self.assertEqual(res['ExitStatus'],0)
        assert res['ct'] is not None
        assert res['dG'] is not None
        assert res['run'] is not None
        assert res['plot_37'] is not None
        assert res['ext_37'] is not None
        res.cleanUp()
Example #7
0
    def test_stdout_input_as_string(self):
        """Test Unafold stdout input as string"""

        u = hybrid_ss_min()
        exp = '\n'.join(unafold_stdout)

        f = open('/tmp/single.fasta', 'w')
        f.write('\n'.join(self.input))
        f.close()
        res = u('/tmp/single.fasta')
        obs = res['StdOut'].read()
        self.assertEqual(obs, exp)
        self.assertEqual(res['ExitStatus'], 0)
        res.cleanUp()
        remove('/tmp/single.fasta')
Example #8
0
    def test_stdout_input_as_string(self):
        """Test Unafold stdout input as string"""

        u = hybrid_ss_min()
        exp = "\n".join(unafold_stdout)

        f = open("/tmp/single.fasta", "w")
        f.write("\n".join(self.input))
        f.close()
        res = u("/tmp/single.fasta")
        obs = res["StdOut"].read()
        self.assertEqual(obs, exp)
        self.assertEqual(res["ExitStatus"], 0)
        res.cleanUp()
        remove("/tmp/single.fasta")
Example #9
0
    def test_stdout_input_as_string(self):
        """Test Unafold stdout input as string"""

        u = hybrid_ss_min()
        exp = '\n'.join(unafold_stdout)

        f = open('/tmp/single.fasta','w')
        f.write('\n'.join(self.input))
        f.close()
        res = u('/tmp/single.fasta')
        obs = res['StdOut'].read()
        self.assertEqual(obs,exp)
        self.assertEqual(res['ExitStatus'],0)
        res.cleanUp()
        remove('/tmp/single.fasta')