Skip to content

Commit

Permalink
Merge pull request #1 from relatko/test_floor_improvements
Browse files Browse the repository at this point in the history
Floor test improvements
  • Loading branch information
relatko authored Oct 27, 2023
2 parents a3bb677 + 1566120 commit e89a868
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/test_floor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUp(self) -> None:
self.floor: Floor = Floor(
[Points(1), Points(2), Points(2)], self.used_tiles)

def test_many_tiles(self) -> None:
def test_tiles(self) -> None:
tiles = [STARTING_PLAYER, RED, GREEN, RED]
self.assertCountEqual(self.floor.state(), "")
self.floor.put(tiles)
Expand All @@ -31,6 +31,17 @@ def test_many_tiles(self) -> None:
self.assertEqual(str(points), "7")
self.assertCountEqual(tiles, self.used_tiles.tiles_given)
self.assertCountEqual(self.floor.state(), "")
tiles2 = [RED, GREEN]
self.floor.put(tiles2[0:1])
self.assertCountEqual(self.floor.state(), "R")
self.floor.put(tiles2[1:2])
self.assertCountEqual(self.floor.state(), "RG")
self.floor.put([])
self.assertCountEqual(self.floor.state(), "RG")
points2: Points = self.floor.finish_round()
self.assertEqual(str(points2), "3")
self.assertCountEqual(tiles+tiles2, self.used_tiles.tiles_given)
self.assertCountEqual(self.floor.state(), "")


if __name__ == '__main__':
Expand Down

0 comments on commit e89a868

Please sign in to comment.