Ejemplo n.º 1
0
def test_month():
    assert month.month_length('September') == 30, 'month length fails'
    assert month.month_length('January') == 31
    assert month.month_length('February', leap_year=True) == 29
    assert month.month_length('February', leap_year=False) == 28
    assert month.month_length('check') == None
Ejemplo n.º 2
0
def test_month_length1():
    '''
    Test suit for month_length function
    '''
    assert month.month_length('September') == 30, "Wrong output. Should be 30"
Ejemplo n.º 3
0
def test_month_length5():
    '''
    Test suit when inputting an invalid string
    '''
    assert month.month_length('Foobar') == None, "Wrong input and output. \
Ejemplo n.º 4
0
def test_month_length4():
    '''
    Test suit for month_length function
    '''
    assert month.month_length(
        'February', leap_year=True) == 29, "Wrong output. Should be 29"
Ejemplo n.º 5
0
def test_month_length3():
    '''
    Test suit for month_length function
    '''
    assert month.month_length('February') == 28, "Wrong output. Should be 28"
Ejemplo n.º 6
0
def test_month_length2():
    '''
    Test suit for month_length function
    '''
    assert month.month_length('May') == 31, "Wrong output. Should be 31"