project_euler.problem_054.test_poker_hand ========================================= .. py:module:: project_euler.problem_054.test_poker_hand Attributes ---------- .. autoapisummary:: project_euler.problem_054.test_poker_hand.SORTED_HANDS project_euler.problem_054.test_poker_hand.TEST_COMPARE project_euler.problem_054.test_poker_hand.TEST_FIVE_HIGH_STRAIGHT project_euler.problem_054.test_poker_hand.TEST_FLUSH project_euler.problem_054.test_poker_hand.TEST_KIND project_euler.problem_054.test_poker_hand.TEST_STRAIGHT project_euler.problem_054.test_poker_hand.TEST_TYPES Functions --------- .. autoapisummary:: project_euler.problem_054.test_poker_hand.generate_random_hand project_euler.problem_054.test_poker_hand.generate_random_hands project_euler.problem_054.test_poker_hand.test_compare_random project_euler.problem_054.test_poker_hand.test_compare_simple project_euler.problem_054.test_poker_hand.test_custom_sort_five_high_straight project_euler.problem_054.test_poker_hand.test_euler_project project_euler.problem_054.test_poker_hand.test_hand_is_five_high_straight project_euler.problem_054.test_poker_hand.test_hand_is_flush project_euler.problem_054.test_poker_hand.test_hand_is_same_kind project_euler.problem_054.test_poker_hand.test_hand_is_straight project_euler.problem_054.test_poker_hand.test_hand_sorted project_euler.problem_054.test_poker_hand.test_hand_values project_euler.problem_054.test_poker_hand.test_multiple_calls_five_high_straight Module Contents --------------- .. py:function:: generate_random_hand() .. py:function:: generate_random_hands(number_of_hands: int = 100) .. py:function:: test_compare_random(hand, other, expected) .. py:function:: test_compare_simple(hand, other, expected) .. py:function:: test_custom_sort_five_high_straight() .. py:function:: test_euler_project() .. py:function:: test_hand_is_five_high_straight(hand, expected, card_values) .. py:function:: test_hand_is_flush(hand, expected) .. py:function:: test_hand_is_same_kind(hand, expected) .. py:function:: test_hand_is_straight(hand, expected) .. py:function:: test_hand_sorted() .. py:function:: test_hand_values(hand, expected) .. py:function:: test_multiple_calls_five_high_straight() .. py:data:: SORTED_HANDS :value: ('4S 3H 2C 7S 5H', '9D 8H 2C 6S 7H', '2D 6D 9D TH 7D', 'TC 8C 2S JH 6C', 'JH 8S TH AH QH', 'TS... .. py:data:: TEST_COMPARE :value: (('2H 3H 4H 5H 6H', 'KS AS TS QS JS', 'Loss'), ('2H 3H 4H 5H 6H', 'AS AD AC AH JD', 'Win'), ('AS... .. py:data:: TEST_FIVE_HIGH_STRAIGHT :value: (('2H 4D 3C AS 5S', True, [5, 4, 3, 2, 14]), ('2H 5D 3C AS 5S', False, [14, 5, 5, 3, 2]), ('JH... .. py:data:: TEST_FLUSH :value: (('2H 3H 4H 5H 6H', True), ('AS AH 2H AD AC', False), ('2H 3H 5H 6H 7H', True), ('KS AS TS QS... .. py:data:: TEST_KIND :value: (('JH AH TH KH QH', 0), ('JH 9H TH KH QH', 0), ('JC KH JS JD JH', 7), ('KH KC 3S 3H 3D', 6),... .. py:data:: TEST_STRAIGHT :value: (('2H 3H 4H 5H 6H', True), ('AS AH 2H AD AC', False), ('2H 3H 5H 6H 7H', False), ('KS AS TS QS... .. py:data:: TEST_TYPES :value: (('JH AH TH KH QH', 23), ('JH 9H TH KH QH', 22), ('JC KH JS JD JH', 21), ('KH KC 3S 3H 3D', 20),...