# Path: poker/card.py
# class Rank(PokerEnum):
#     DEUCE = "2", 2
#     THREE = "3", 3
#     FOUR = "4", 4
#     FIVE = "5", 5
#     SIX = "6", 6
#     SEVEN = "7", 7
#     EIGHT = "8", 8
#     NINE = "9", 9
#     TEN = "T", 10
#     JACK = ("J",)
#     QUEEN = ("Q",)
#     KING = ("K",)
#     ACE = "A", 1
# 
#     @classmethod
#     def difference(cls, first, second):
#         """Tells the numerical difference between two ranks."""
# 
#         # so we always get a Rank instance even if string were passed in
#         first, second = cls(first), cls(second)
#         rank_list = list(cls)
#         return abs(rank_list.index(first) - rank_list.index(second))


import pytest
from poker.card import Rank


def test_comparisons():
    assert Rank("A") > Rank("K")
    assert Rank("K") > Rank("Q")
    assert Rank("Q") > Rank("J")
    assert Rank("J") > Rank("T")
    assert Rank("T") > Rank("9")
    assert Rank("9") > Rank("2")

# Path: poker/card.py
# class Rank(PokerEnum):
#     DEUCE = "2", 2
#     THREE = "3", 3
#     FOUR = "4", 4
#     FIVE = "5", 5
#     SIX = "6", 6
#     SEVEN = "7", 7
#     EIGHT = "8", 8
#     NINE = "9", 9
#     TEN = "T", 10
#     JACK = ("J",)
#     QUEEN = ("Q",)
#     KING = ("K",)
#     ACE = "A", 1
# 
#     @classmethod
#     def difference(cls, first, second):
#         """Tells the numerical difference between two ranks."""
# 
#         # so we always get a Rank instance even if string were passed in
#         first, second = cls(first), cls(second)
#         rank_list = list(cls)
#         return abs(rank_list.index(first) - rank_list.index(second))


# Path: tests/test_rank.py
import pytest
from poker.card import Rank



def test_comparisons():
    assert Rank("A") > Rank("K")
    assert Rank("K") > Rank("Q")
    assert Rank("Q") > Rank("J")
    assert Rank("J") > Rank("T")
    assert Rank("T") > Rank("9")
    assert Rank("9") > Rank("2")

    assert Rank("A") > Rank("2")