Skip to content

Commit 9e938ed

Browse files
authored
Merge pull request #148 from kayjan/abstract-newick
Abstract newick
2 parents 94e7899 + cdabdd4 commit 9e938ed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/test_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ class Constants:
151151
ERROR_NODE_MERMAID_INVALID_ARGUMENT = (
152152
"Invalid input, check `{parameter}` should be one of "
153153
)
154+
ERROR_NODE_NEWICK_ATTR_INVALID = "Length attribute does not exist for node "
154155

155156
# tree/helper
156157
ERROR_NODE_PRUNE_ARGUMENT = (

tests/tree/test_export.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,9 +1397,7 @@ def test_tree_to_newick_length(tree_node):
13971397
def test_tree_to_newick_length_invalid_error(tree_node):
13981398
with pytest.raises(ValueError) as exc_info:
13991399
tree_to_newick(tree_node, length_attr="age2")
1400-
assert str(exc_info.value).startswith(
1401-
"Length attribute does not exist for node "
1402-
)
1400+
assert str(exc_info.value).startswith(Constants.ERROR_NODE_NEWICK_ATTR_INVALID)
14031401

14041402
@staticmethod
14051403
def test_tree_to_newick_length_sep(tree_node):

0 commit comments

Comments
 (0)