@@ -18,25 +18,25 @@ def test_black_corner_territory_on_5x5_board(self):
18
18
board = go_counting .Board (board5x5 )
19
19
stone , territory = board .territory (x = 0 , y = 1 )
20
20
self .assertEqual (stone , go_counting .BLACK )
21
- self .assertEqual (territory , {(0 , 0 ), (0 , 1 ), (1 , 0 )})
21
+ self .assertSetEqual (territory , {(0 , 0 ), (0 , 1 ), (1 , 0 )})
22
22
23
23
def test_white_center_territory_on_5x5_board (self ):
24
24
board = go_counting .Board (board5x5 )
25
25
stone , territory = board .territory (x = 2 , y = 3 )
26
26
self .assertEqual (stone , go_counting .WHITE )
27
- self .assertEqual (territory , {(2 , 3 )})
27
+ self .assertSetEqual (territory , {(2 , 3 )})
28
28
29
29
def test_open_corner_territory_on_5x5_board (self ):
30
30
board = go_counting .Board (board5x5 )
31
31
stone , territory = board .territory (x = 1 , y = 4 )
32
32
self .assertEqual (stone , go_counting .NONE )
33
- self .assertEqual (territory , {(0 , 3 ), (0 , 4 ), (1 , 4 )})
33
+ self .assertSetEqual (territory , {(0 , 3 ), (0 , 4 ), (1 , 4 )})
34
34
35
35
def test_a_stone_and_not_a_territory_on_5x5_board (self ):
36
36
board = go_counting .Board (board5x5 )
37
37
stone , territory = board .territory (x = 1 , y = 1 )
38
38
self .assertEqual (stone , go_counting .NONE )
39
- self .assertEqual (territory , set ())
39
+ self .assertSetEqual (territory , set ())
40
40
41
41
def test_invalid_because_x_is_too_low (self ):
42
42
board = go_counting .Board (board5x5 )
@@ -72,17 +72,17 @@ def test_two_territories_rectangular_board(self):
72
72
]
73
73
board = go_counting .Board (input_board )
74
74
territories = board .territories ()
75
- self .assertEqual (territories [go_counting .BLACK ], {(0 , 0 ), (0 , 1 )})
76
- self .assertEqual (territories [go_counting .WHITE ], {(3 , 0 ), (3 , 1 )})
77
- self .assertEqual (territories [go_counting .NONE ], set ())
75
+ self .assertSetEqual (territories [go_counting .BLACK ], {(0 , 0 ), (0 , 1 )})
76
+ self .assertSetEqual (territories [go_counting .WHITE ], {(3 , 0 ), (3 , 1 )})
77
+ self .assertSetEqual (territories [go_counting .NONE ], set ())
78
78
79
79
def test_two_region_rectangular_board (self ):
80
80
input_board = [" B " ]
81
81
board = go_counting .Board (input_board )
82
82
territories = board .territories ()
83
- self .assertEqual (territories [go_counting .BLACK ], {(0 , 0 ), (2 , 0 )})
84
- self .assertEqual (territories [go_counting .WHITE ], set ())
85
- self .assertEqual (territories [go_counting .NONE ], set ())
83
+ self .assertSetEqual (territories [go_counting .BLACK ], {(0 , 0 ), (2 , 0 )})
84
+ self .assertSetEqual (territories [go_counting .WHITE ], set ())
85
+ self .assertSetEqual (territories [go_counting .NONE ], set ())
86
86
87
87
# Utility functions
88
88
def setUp (self ):
0 commit comments