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'
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'
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
def test_parse_nodelabels(self): i, m, o, n = parse_args(['%s' % __file__, '-l']) assert i == __file__ assert m == 'newick' # default assert n == True
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
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
def test_IOError_on_no_file(self): with self.assertRaises(IOError): parse_args(['a'])
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)
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
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)