def test_simple_phylo_assembly ( self ) :
     """
     Test of the consensus tree method for all the available configurations
     with supported input and output formats.
     """
     for keyword in viewkeys(PhyloAssemble.get_keywords(consense_exe)) :
         self.standard_test('newick', 'newick', keyword)
    def standard_test ( self, informat, outformat, params ) :
        """
        Standard testing procedure used by all tests.

        Arguments :
            informat  ( string )
                Input file format.
            outformat  ( string )
                Output file format.
            params  ( string )
                Arguments passed to the consensus tree tool.
        """
        infile = '{}/f002.trees.{}'.format(informat.capitalize(), informat)
        outfile = 'tmp_test.tree'
        self.add_file_to_clean(outfile)
        # Check the input
        self.assertTrue(os.path.isfile(infile))
        self.assertEqual(len(list(Phylo.parse(infile, informat))), 9)
        # Generate the consensus tree
        PhyloAssemble.get_consensus_tree(consense_exe, infile, informat,
            args=params, outfile=outfile, outfile_format=outformat)
        # Check the output
        self.assertTrue(os.path.isfile(outfile))