예제 #1
0
파일: utils_test.py 프로젝트: ssiegel/khal
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
예제 #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
예제 #3
0
파일: utils_test.py 프로젝트: ssiegel/khal
def test_weekdaypstr_invalid():
    with pytest.raises(ValueError):
        weekdaypstr('foobar')
예제 #4
0
def test_weekdaypstr_invalid():
    with pytest.raises(ValueError):
        weekdaypstr('foobar')