예제 #1
0
def test_strifiy():
    assert "Rock" == str(ChoiceCreator.create("r"))
    assert "Scissors" == str(ChoiceCreator.create("s"))
    assert "Paper" == str(ChoiceCreator.create("p"))
예제 #2
0
def test_paper_beats_rock():
    assert ChoiceCreator.create("p").beats(ChoiceCreator.create("r")) == True
    assert ChoiceCreator.create("r").beats(ChoiceCreator.create("p")) == False
예제 #3
0
def test_rock_beats_scissors():
    assert ChoiceCreator.create("s").beats(ChoiceCreator.create("p")) == True
    assert ChoiceCreator.create("s").beats(ChoiceCreator.create("r")) == False
예제 #4
0
def test_scissors_beats_paper():
    assert ChoiceCreator.create("s").beats(ChoiceCreator.create("p")) == True
    assert ChoiceCreator.create("p").beats(ChoiceCreator.create("s")) == False
def test_equality():
   assert ChoiceCreator.create("r") == ChoiceCreator.create("r")
   assert ChoiceCreator.create("s") == ChoiceCreator.create("s")
   assert ChoiceCreator.create("p") == ChoiceCreator.create("p")
def test_scissors_beats_paper():
   assert ChoiceCreator.create("s").beats(ChoiceCreator.create("p")) == True
   assert ChoiceCreator.create("p").beats(ChoiceCreator.create("s")) == False
def test_rock_beats_scissors():
   assert ChoiceCreator.create("s").beats(ChoiceCreator.create("p")) == True
   assert ChoiceCreator.create("s").beats(ChoiceCreator.create("r")) == False
def test_paper_beats_rock():
   assert ChoiceCreator.create("p").beats(ChoiceCreator.create("r")) == True
   assert ChoiceCreator.create("r").beats(ChoiceCreator.create("p")) == False
def test_strifiy():
   assert "Rock" == str(ChoiceCreator.create("r"))
   assert "Scissors" == str(ChoiceCreator.create("s"))
   assert "Paper" == str(ChoiceCreator.create("p"))