Skip to content

Commit

Permalink
Update test_strongly_connected.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuki0824 committed Dec 15, 2024
1 parent d570bd2 commit 9c026b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/digraph/test_strongly_connected.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def test_number_strongly_connected_big(self):
G.add_child(node, str(i), {})
self.assertEqual(len(rustworkx.strongly_connected_components(G)), 200000)


class TestCondensation(unittest.TestCase):
def setUp(self):
# グラフをセットアップ
Expand Down Expand Up @@ -99,7 +100,9 @@ def test_condensation(self):
self.assertEqual(condensed_graph.node_count(), 2) # [SCC(a, b, c, d), SCC(e, f, g, h)]

# エッジ数を確認
self.assertEqual(condensed_graph.edge_count(), 1) # Edge: [SCC(a, b, c, d)] -> [SCC(e, f, g, h)]
self.assertEqual(
condensed_graph.edge_count(), 1
) # Edge: [SCC(a, b, c, d)] -> [SCC(e, f, g, h)]

# 縮約されたノードの内容を確認
nodes = list(condensed_graph.nodes())
Expand Down

0 comments on commit 9c026b2

Please sign in to comment.