File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 7
7
class TestGraph (unittest .TestCase ):
8
8
9
9
def test_init (self ):
10
- # Undirected graph with not vertices
10
+ # Undirected graph with no vertices
11
11
g = graph .Graph ()
12
12
self .assertFalse (g .directed )
13
13
self .assertIsInstance (g .out_mapping , defaultdict )
14
14
self .assertIsInstance (g .in_mapping , defaultdict )
15
- self .assertFalse (g ._edges )
15
+ self .assertEqual (g ._edges , [] )
16
16
17
17
# Directed graph with no vertices
18
18
g = graph .Graph (directed = True )
19
19
self .assertTrue (g .directed )
20
20
self .assertIsInstance (g .out_mapping , defaultdict )
21
21
self .assertIsInstance (g .in_mapping , defaultdict )
22
- self .assertFalse (g ._edges )
22
+ self .assertEqual (g ._edges , [] )
23
23
24
24
# Undirected graph with vertices and unweighted edges
25
25
g = graph .Graph (edges = [[1 , 2 ], [2 , 3 ]])
You can’t perform that action at this time.
0 commit comments