Exemplo n.º 1
0
def test_CurveMinExc():  #Start tests for CurveADT Exception cases

    testX = [1, 2, 1, 4, 5, 6, 7]
    testY = [1, 4, 9, 16, 25, 36, 49]

    a = CurveT(testX, testY, 2)

    assert (a.minD() == None)  #Fail due to exception thrown at init
Exemplo n.º 2
0
def test_CurveMin():  #Start tests for CurveADT normal cases

    testX = [1, 2, 3, 4, 5, 6, 7]
    testY = [1, 4, 9, 16, 25, 36, 49]

    a = CurveT(testX, testY, 2)

    assert (a.minD() == 1)  #Normal cases