def test_invalid(): w = NexusWriter() with pytest.raises(ValueError): w.write()
def test_write_with_no_data_but_trees(): nex = NexusWriter() nex.trees.append('tree tree1 = (French,(English,Latin));') content = nex.write() assert re.search(r"BEGIN TREES", content) assert re.search(r"tree tree1 = \(French,\(English,Latin\)\);", content)