def test_card_constructor_throws_appropriate_exceptions(self): with self.assertRaises(ValueError): Card('15', 'S') with self.assertRaises(ValueError): Card('xx', 'S') with self.assertRaises(ValueError): Card('10', 'NotExist') with self.assertRaises(ValueError): Card('0', 'S')
def setUp(self): self.ace_of_diamonds = Card(1, 'D') self.ten_of_spades = Card(10, 'S') self.five_of_clubs = Card(5, 'C') self.jack_of_hearts = Card(11, 'H')