refactor: Move constants outside of variable scope (#7262)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Caeden
2022-10-16 10:33:29 +01:00
committed by GitHub
parent 7776411621
commit c6582b35bf
17 changed files with 107 additions and 97 deletions

View File

@@ -185,12 +185,12 @@ def test_compare_random(hand, other, expected):
def test_hand_sorted():
POKER_HANDS = [PokerHand(hand) for hand in SORTED_HANDS] # noqa: N806
list_copy = POKER_HANDS.copy()
poker_hands = [PokerHand(hand) for hand in SORTED_HANDS]
list_copy = poker_hands.copy()
shuffle(list_copy)
user_sorted = chain(sorted(list_copy))
for index, hand in enumerate(user_sorted):
assert hand == POKER_HANDS[index]
assert hand == poker_hands[index]
def test_custom_sort_five_high_straight():