def test_set(): assert check_set([ Card(2, 'DIAMOND', 'STRIPPED', 'RED'), Card(2, 'DIAMOND', 'STRIPPED', 'RED'), Card(2, 'DIAMOND', 'STRIPPED', 'RED') ]) is True assert check_set([ Card(1, 'DIAMOND', 'STRIPPED', 'RED'), Card(2, 'OVAL', 'OPEN', 'GREEN'), Card(3, 'SQUIGGLE', 'SOLID', 'PURPLE') ]) is True assert check_set([ Card(3, 'OVAL', 'OPEN', 'GREEN'), Card(3, 'OVAL', 'OPEN', 'GREEN'), Card(3, 'OVAL', 'OPEN', 'GREEN') ]) is True assert check_set([ Card(3, 'DIAMOND', 'STRIPPED', 'GREEN'), Card(3, 'DIAMOND', 'SOLID', 'RED'), Card(2, 'OVAL', 'STRIPPED', 'GREEN') ]) is False assert check_set([ Card(1, 'SQUIGGLE', 'SOLID', 'PURPLE'), Card(3, 'SQUIGGLE', 'OPEN', 'GREEN'), Card(3, 'DIAMOND', 'OPEN', 'GREEN') ]) is False assert check_set([ Card(3, 'DIAMOND', 'STRIPPED', 'RED'), Card(2, 'OVAL', 'OPEN', 'RED'), Card(2, 'OVAL', 'OPEN', 'GREEN') ]) is False
def test_check_false(): cards = set_game.check_set_false() for i in cards: assert not set_game.check_set(i)
def test_check_true(): cards = set_game.check_set_true() for i in cards: assert set_game.check_set(i)
def test_check_set_return_false_3(self): 'Возврат False при комбинации noset' self.assertEqual( set_game.check_set( set_game.get_three_cards_from_index(set_game.no_set_3)), False)
def test_check_set_return_true_3(self): 'Возврат True при комбинации set' self.assertEqual( set_game.check_set( set_game.get_three_cards_from_index(set_game.set_3)), True)
def test_check_set_false(): assert not set_game.check_set(card_set_false_1) and not set_game.check_set( card_set_false_2) and not set_game.check_set(card_set_false_3) == True
def test_check_set_true(): assert set_game.check_set(card_set_true_1) and set_game.check_set( card_set_true_2) and set_game.check_set(card_set_true_3) == True