Ejemplo n.º 1
0
def test_incorrect_args():
    with pytest.raises(TypeError):
        sun_angle(1245)
Ejemplo n.º 2
0
def test_no_args():
    with pytest.raises(TypeError):
        sun_angle()
Ejemplo n.º 3
0
def test_seven_am():
    assert sun_angle("07:00") == 15, "07:00"
Ejemplo n.º 4
0
def test_empty_string():
    with pytest.raises(ValueError):
        sun_angle("")
Ejemplo n.º 5
0
def test_incorrect_time_format():
    with pytest.raises(ValueError):
        sun_angle("0_6:00")
Ejemplo n.º 6
0
def test_twelve_fifteen_am():
    assert sun_angle("12:15") == 93.75, "12:15"
Ejemplo n.º 7
0
def test_six_am():
    assert sun_angle("06:00") == 0, "06:00"
Ejemplo n.º 8
0
def test_six_one_pm():
    assert sun_angle("18:01") == "I don't see the sun!", "18:01"
Ejemplo n.º 9
0
def test_six_pm():
    assert sun_angle("18:00") == 180, "18:00"
Ejemplo n.º 10
0
def test_one_pm():
    assert sun_angle("01:00") == "I don't see the sun!", "01:00"