Exemple #1
0
def test_computer_play_is_valid():
    for _ in range(5000):
        play = rps.generate_computer_play()
        assert rps.is_valid_play(play)
def test_paper_is_valid_play():
    assert rps.is_valid_play(
        'paper') is True  #vyhodnocujeme, že je ten výsledek přesně TRUE!
Exemple #3
0
def test_random_valid_play_is_valid():
	for _ in range (100):
		play = rps.random_play()
		assert rps.is_valid_play(play)
Exemple #4
0
def test_scissors_is_valid_play():
    assert rps.is_valid_play('scissors') is True
Exemple #5
0
def test_random_play_is_always_valid():
    for _ in range(1000):
        assert rps.is_valid_play(rps.random_play())
Exemple #6
0
def test_rock_is_valid_play():
    assert rps.is_valid_play(
        'rock'
    ) is True  # miesto is je možné použiť == (v tomto prípade, inak to nie je to isté)
Exemple #7
0
def test_string_is_invalid_play():
    assert rps.is_valid_play('abc') is False
def test_lizard_is_not_valid_play():
    assert rps.is_valid_play("lizard") is False
Exemple #9
0
def test_empty_play():
    assert rps.is_valid_play("") is False
Exemple #10
0
def test_number_is_invalid_play():
    assert rps.is_valid_play(123) is False
Exemple #11
0
def test_invalid_play():
    assert rps.is_valid_play("kdjfla") is False
def test_rock_is_valid_play():
    assert rps.is_valid_play('rock') is True  #běžná syntaxe
def test_random_play_is_valid():
    for _ in range(100):
        play = rps.random_play()
        assert rps.is_valid_play(play)  # is True by to bylo navíc
Exemple #14
0
def test_int_is_not_a_valid_play():
    assert rps.is_valid_play(3) is False
Exemple #15
0
def test_rock_is_valid_play(play):
    assert rps.is_valid_play(play) is True
Exemple #16
0
def test_blbost_is_not_a_valid_play():
    assert rps.is_valid_play('blbost') is False
Exemple #17
0
def test_paper_is_valid_play():
    assert rps.is_valid_play("paper")
def test_spock_is_not_valid_play():
    assert rps.is_valid_play("spock") is False
Exemple #19
0
def test_scissors_is_valid_play():
    assert rps.is_valid_play("scissors")
Exemple #20
0
def test_spongebob_is_invalid_play():
    assert rps.is_valid_play('spongebob') is False
Exemple #21
0
def test_rock_is_valid_play():
    assert rps.is_valid_play("rock")
Exemple #22
0
def test_spock_is_valid_play():
        assert rps.is_valid_play('sock') is False
Exemple #23
0
def test_invalid_play():
    assert rps.is_valid_play('lizard') == False
Exemple #24
0
def test_paper_is_valid_play():
    assert rps.is_valid_play('paper') is True
Exemple #25
0
def test_rock_is_valid_play():
    assert rps.is_valid_play('rock') is True  # ověří, že fce vrací přesně True
Exemple #26
0
def test_lizzard_is_valid_play():
    assert rps.is_valid_play('lizard') is False
Exemple #27
0
def test_paper_is_valid_play():
    assert rps.is_valid_play('paper') is True  # 1 is True vrací False
Exemple #28
0
def test_rock_is_valid_play():
    assert rps.is_valid_play('rock') is True
Exemple #29
0
def test_fuck_is_invalid_play():
    assert rps.is_valid_play("f**k") is False