Beispiel #1
0
def test_weekdaypstr():
    for string, weekdayno in [
        ('monday', 0),
        ('tue', 1),
        ('wednesday', 2),
        ('thursday', 3),
        ('fri', 4),
        ('saturday', 5),
        ('sun', 6),
    ]:
        assert weekdaypstr(string) == weekdayno
Beispiel #2
0
def test_weekdaypstr():
    for string, weekdayno in [
            ('monday', 0),
            ('tue', 1),
            ('wednesday', 2),
            ('thursday', 3),
            ('fri', 4),
            ('saturday', 5),
            ('sun', 6),
    ]:
        assert weekdaypstr(string) == weekdayno
Beispiel #3
0
def test_weekdaypstr_invalid():
    with pytest.raises(ValueError):
        weekdaypstr('foobar')
Beispiel #4
0
def test_weekdaypstr_invalid():
    with pytest.raises(ValueError):
        weekdaypstr('foobar')