Exemple #1
0
def test_allowed_to_drive(capfd):
    allowed_driving('bob', 18)
    output = capfd.readouterr()[0].strip()
    assert output == 'bob is allowed to drive'

    allowed_driving('julian', 19)
    output = capfd.readouterr()[0].strip()
    assert output == 'julian is allowed to drive'
Exemple #2
0
def test_allowed_to_drive(capfd):
    allowed_driving("bob", 18)
    output = capfd.readouterr()[0].strip()
    assert output == "bob is allowed to drive"

    allowed_driving("julian", 19)
    output = capfd.readouterr()[0].strip()
    assert output == "julian is allowed to drive"
Exemple #3
0
def test_allowed_to_drive_other_name(capfd):
    allowed_driving('julian', 19)
    output = capfd.readouterr()[0].strip()
    assert output == 'julian is allowed to drive'

    test_allowed_to_drive()
    test_allowed_to_drive_other_name()
    test_not_allowed_to_drive()
Exemple #4
0
def test_not_allowed_to_drive(capfd):
    allowed_driving("tim", 17)
    output = capfd.readouterr()[0].strip()
    assert output == "tim is not allowed to drive"
Exemple #5
0
def test_allowed_to_drive_other_name(capfd):
    allowed_driving("julian", 19)
    output = capfd.readouterr()[0].strip()
    assert output == "julian is allowed to drive"
def test_not_allowed_to_drive(capfd):
    allowed_driving('tim', 16)
    output = capfd.readouterr()[0].strip()
    assert output == 'tim is not allowed to drive'