summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networkx/algorithms/tests/test_euler.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/networkx/algorithms/tests/test_euler.py b/networkx/algorithms/tests/test_euler.py
index cba66ee6..08eaf7fc 100644
--- a/networkx/algorithms/tests/test_euler.py
+++ b/networkx/algorithms/tests/test_euler.py
@@ -239,6 +239,18 @@ class TestEulerianPath:
with pytest.raises(nx.NetworkXError):
list(nx.eulerian_path(G, source=1))
+ @pytest.mark.parametrize(
+ ("graph_type", "result"),
+ (
+ (nx.MultiGraph, [(0, 1, 0), (1, 0, 1)]),
+ (nx.MultiDiGraph, [(0, 1, 0), (1, 0, 0)]),
+ ),
+ )
+ def test_eulerian_with_keys(self, graph_type, result):
+ G = graph_type([(0, 1), (1, 0)])
+ answer = nx.eulerian_path(G, keys=True)
+ assert list(answer) == result
+
class TestEulerize:
def test_disconnected(self):