Esempio n. 1
0
def test_five_times_zero():
    """
    tests if calculator2 accurately multiplies 5 x 0 to get 0
    """
    assert multiply(5, 0) == 0
Esempio n. 2
0
def test_five_times_ten():
    """
    tests if calculator2 accurately multiplies 5 x 10 to get 50
    """
    assert multiply(5, 10) == 50
Esempio n. 3
0
def test_no_multiplication_parameters():
    """
    tests if calculator2 accurately multiplies to a net of zeros when no
    values are presented
    """
    assert multiply() == 0
Esempio n. 4
0
def test_five_pt_two_x_ten_point_three():
    """
    tests if calculator2 accurately multiplies 5.2 x 10.3 to get 53.56
    """
    assert multiply(5.2, 10.3) == 53.56
Esempio n. 5
0
def test_five_x_ten_x_negtwenty():
    """
    tests if calculator2 accurately multiplies 5 x 10 x -20 to get -1000
    """
    assert multiply(5, 10, -20) == -1000
def test_only_one_multiplication_parameter():
    """
    tests if calculator2 accurately reports an attempt to multiply a
    single value presented by no other value as an error
    """
    assert multiply(5) == IndexError