We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c117e19 commit 25da9adCopy full SHA for 25da9ad
tests/test_count_connected_components.py
@@ -1,22 +1,25 @@
1
+#import modules
2
import unittest
3
from algorithms.graph import count_connected_number_of_component
4
5
class TestConnectedComponentInGraph(unittest.TestCase):
- """ Class """
6
+ """ Class to performs unit tests """
7
8
def test_count_connected_components(self):
9
"""
10
Test Function that test the different cases of count connected components
11
- 0----------2 1--------5 3
12
- |
13
14
- 4
15
-
16
- output = 3
+ 0----------2 1--------5 3
+ |
+ 4
+
17
+ output = 3
18
19
20
expected_result = 3
21
22
+ # adjacency list representation of graph
23
l = [[2],
24
[5],
25
[0,4],
0 commit comments