def test_room_completed(cards): r = Room(cards) r.select_card('j') r.select_card('k') r.select_card('l') r.select_card(';') assert r.completed() == True
def test_room_not_completed(cards): r = Room(cards) r.select_card(';') assert r.completed() == False
def test_room_select_card(cards): r = Room(cards, player_escaped_previous_room=True) card = r.select_card('k') assert card.suit == SPADE assert card.value == 2
def test_room_previous_escaped(cards): r = Room(cards, player_escaped_previous_room=True) assert r.escapable() == False r.select_card('k') r.select_card('l') assert r.escapable() == True