def test_invalid_rank(self): self.assertRaises(RuntimeError, Card, Suit.clubs, -1) self.assertRaises(RuntimeError, Card, Suit.clubs, Rank.count())
def test_rank_count(self): self.assertEqual(Rank.count(), 13, 'A card must have 13 ranks')