Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/word-graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ The word graphs *x* and *y* are equal at a node *s* if:
m.def(
"word_graph_follow_path",
[](WordGraph_ const& wg, node_type from, word_type const& path) {
return word_graph::follow_path(wg, from, path);
return from_int(word_graph::follow_path(wg, from, path));
},
py::arg("wg"),
py::arg("from"),
Expand Down
3 changes: 3 additions & 0 deletions tests/test_word_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ def test_follow_path(word_graphs):
with pytest.raises(LibsemigroupsError):
word_graph.follow_path(wg1, 6, [0])

wg1.init(1, 2)
assert word_graph.follow_path(wg1, 0, [0] * 6) == UNDEFINED


def test_is_acyclic(word_graphs):
wg1, wg2 = word_graphs
Expand Down