Beispiel #1
0
 def test_dragon_is_honor(self):
     tileset = Tileset(["C", "C", "C", "C"])
     self.assertEqual(tileset.tile_type, "honor")
Beispiel #2
0
 def test_suited_set_is_not_honor(self):
     tileset = Tileset(["6#", "7#", "8#"])
     self.assertRaises(AttributeError, lambda: tileset.honor)
Beispiel #3
0
 def test_chow(self):
     tileset = Tileset(["7#", "8#", "9#"])
     self.assertEqual(tileset.type, "chow")
Beispiel #4
0
 def test_dragon(self):
     tileset = Tileset(["C", "C", "C", "C"])
     self.assertEqual(tileset.honor, "dragon")
Beispiel #5
0
 def test_terminal_kong_9(self):
     tileset = Tileset(["9#", "9#", "9#", "9#"])
     self.assertEqual(tileset.tile_type, "terminal")
Beispiel #6
0
 def test_thirteen_orphans_has_no_suit(self):
     tileset = Tileset([
         "1/", "9/", "E", "C", "1#", "9#", "F", "S", "1●", "9●", "B", "N",
         "W", "W"
     ])
     self.assertRaises(AttributeError, lambda: tileset.suit)
Beispiel #7
0
 def test_knitted(self):
     tileset = Tileset(["2●", "5●", "8●"])
     self.assertEqual(tileset.type, "knitted")
Beispiel #8
0
 def test_terminal_pung_1(self):
     tileset = Tileset(["1●", "1●", "1●"])
     self.assertEqual(tileset.tile_type, "terminal")
Beispiel #9
0
 def test_pair_suited(self):
     tileset = Tileset(["6/", "6/"])
     self.assertEqual(tileset.type, "pair")
Beispiel #10
0
 def test_pair_honors(self):
     tileset = Tileset(["W", "W"])
     self.assertEqual(tileset.type, "pair")
Beispiel #11
0
 def test_kong_honors(self):
     tileset = Tileset(["F", "F", "F", "F"])
     self.assertEqual(tileset.type, "kong")
Beispiel #12
0
 def test_kong_suited(self):
     tileset = Tileset(["1●", "1●", "1●", "1●"])
     self.assertEqual(tileset.type, "kong")
Beispiel #13
0
 def test_pung_honors(self):
     tileset = Tileset(["E", "E", "E"])
     self.assertEqual(tileset.type, "pung")
Beispiel #14
0
 def test_terminal_chow_1(self):
     tileset = Tileset(["1●", "2●", "3●"])
     self.assertEqual(tileset.tile_type, "terminal")
Beispiel #15
0
 def test_special_set(self):
     tileset = Tileset([
         "E", "E", "8/", "8/", "4#", "4#", "4●", "4●", "N", "N", "9#", "9#",
         "B", "B"
     ])
     self.assertEqual(tileset.type, "special")
Beispiel #16
0
 def test_terminal_chow_9(self):
     tileset = Tileset(["7#", "8#", "9#"])
     self.assertEqual(tileset.tile_type, "terminal")
Beispiel #17
0
 def test_wind(self):
     tileset = Tileset(["N", "N", "N", "N"])
     self.assertEqual(tileset.honor, "wind")
Beispiel #18
0
 def test_pung_suited(self):
     tileset = Tileset(["7#", "7#", "7#"])
     self.assertEqual(tileset.type, "pung")
Beispiel #19
0
 def test_wind_is_honor(self):
     tileset = Tileset(["N", "N", "N", "N"])
     self.assertEqual(tileset.tile_type, "honor")
Beispiel #20
0
 def test_knitted_is_not_terminal(self):
     tileset = Tileset(["3/", "6/", "9/"])
     self.assertRaises(AttributeError, lambda: tileset.tile_type)
Beispiel #21
0
 def test_seven_shifted_pairs_has_suit(self):
     tileset = Tileset([
         "3/", "3/", "4/", "4/", "5/", "5/", "6/", "6/", "7/", "7/", "8/",
         "8/", "9/", "9/"
     ])
     self.assertEqual(tileset.suit, "bamboo")