Exemple #1
0
 def test_is_flush(self):
     label_patterns = [
         True, False, True, False, False, False, False, False, False, True,
         False
     ]
     for hands, label in zip(self.hands_patterns, label_patterns):
         with self.subTest(hands=hands, label=label):
             self.assertEqual(poker.is_flush(hands), label)
Exemple #2
0
 def test_flush_false(self):
     self.assertFalse(is_flush([
         Card('T', 'S'), Card('3', 'D'),
         Card('2', 'D'), Card('6', 'D'),
         Card('A', 'D')
     ]))
Exemple #3
0
 def test_flush_true(self):
     self.assertTrue(is_flush([
         Card('T', 'D'), Card('3', 'D'),
         Card('2', 'D'), Card('6', 'D'),
         Card('A', 'D')
     ]))
Exemple #4
0
 def test_is_flush(self):
     hand = ["2C", "8C", "4C", "TC", "6C"]
     self.assertTrue(is_flush(hand))