Esempio n. 1
0
 def test_parse_mode(self):
     i, m, o = parse_args(['%s' % __file__, '-m' , 'newick'])
     assert i == __file__
     assert m == 'newick'
     
     i, m, o = parse_args(['%s' % __file__, '-m', 'nexus'])
     assert i == __file__
     assert m == 'nexus'
Esempio n. 2
0
    def test_parse_mode(self):
        i, m, o = parse_args(['%s' % __file__, '-m', 'newick'])
        assert i == __file__
        assert m == 'newick'

        i, m, o = parse_args(['%s' % __file__, '-m', 'nexus'])
        assert i == __file__
        assert m == 'nexus'
Esempio n. 3
0
    def test_parse_mode(self):
        i, m, o, n = parse_args(['%s' % __file__, '-m', 'newick'])
        assert i == __file__
        assert m == 'newick'
        assert n == False  # default

        i, m, o, n = parse_args(['%s' % __file__, '-m', 'nexus'])
        assert i == __file__
        assert m == 'nexus'
        assert n == False  # default
Esempio n. 4
0
 def test_parse_nodelabels(self):
     i, m, o, n = parse_args(['%s' % __file__, '-l'])
     assert i == __file__
     assert m == 'newick'  # default
     assert n == True
Esempio n. 5
0
 def test_parse_filename_and_full_output(self):
     i, m, o, n = parse_args(['%s' % __file__, '--output', 'test'])
     assert i == __file__
     assert m == 'newick'  # default
     assert o == 'test', repr(o)
     assert n == False  # default
Esempio n. 6
0
 def test_parse_filename_only(self):
     i, m, o, n = parse_args(['%s' % __file__])
     assert i == __file__
     assert m == 'newick'  # default
     assert o is None  # No output file
     assert n == False  # default
Esempio n. 7
0
 def test_IOError_on_no_file(self):
     with self.assertRaises(IOError):
         parse_args(['a'])
Esempio n. 8
0
 def test_parse_filename_and_full_output(self):
     i, m, o = parse_args(['%s' % __file__, '--output', 'test'])
     assert i == __file__
     assert m == 'newick'  # default
     assert o == 'test', repr(o)
Esempio n. 9
0
 def test_parse_filename_only(self):
     i, m, o = parse_args(['%s' % __file__])
     assert i == __file__
     assert m == 'newick'  # default
     assert o is None  # No output file
Esempio n. 10
0
 def test_IOError_on_no_file(self):
     with self.assertRaises(IOError):
         parse_args(['a'])
Esempio n. 11
0
 def test_parse_filename_and_output(self):
     i, m, o = parse_args(['%s' % __file__, '-o', 'test'])
     assert i == __file__
     assert m == 'newick'  # default
     assert o == 'test', repr(o)