Beispiel #1
0
def test_pythagoros_ab_neg():
    result = pythagoras(a=-2, b=-3)
    expected = -1

    assert result == expected
Beispiel #2
0
def test_pythagoros_b_neg():
    result = pythagoras(a=1, b=-4)
    expected = -1

    assert result == expected
Beispiel #3
0
def test_pythagoros_01_03():
    result = pythagoras(a=0.1, b=0.3)
    expected = 0.32

    assert abs(result - expected) < 0.1
Beispiel #4
0
def test_pythagoros_4_5():
    result = pythagoras(a=4, b=5)
    expected = 6.4

    assert abs(result - expected) < 0.1
Beispiel #5
0
def test_pythagoros_2():
    result = pythagoras(a=2, b=2)
    expected = 2.83

    assert abs(result - expected) < 0.1
Beispiel #6
0
def test_pythagoros_1():
    result = pythagoras(a=1, b=1)
    expected = 1.41

    assert abs(result - expected) < 0.1