def test_sort_order(self): cards = Card.from_masks([l3.mask, l4.mask]) cards.sort() self.assertListEqual([card.mask for card in cards], [l3.mask, l4.mask]) cards = Card.from_masks([l4.mask, l3.mask]) cards.sort() self.assertListEqual([card.mask for card in cards], [l3.mask, l4.mask])
def test_masks(self): card = Card(Card.SUIT_LOWER, Card.RANK_TWO) card2 = Card(Card.SUIT_LOWER, Card.RANK_THREE) self.assertListEqual(Card.from_masks([l2.mask, l3.mask]), [card, card2])