Beispiel #1
0
def test_sgpa_int_4():
    assert abs(calculate_sgpa('F', 'F', 'nothing') - 0) < epsilon
Beispiel #2
0
def test_sgpa_int_2():
    assert abs(calculate_sgpa('F', 'F', 'F') - 0) < epsilon
Beispiel #3
0
def test_sgpa_int_3():
    assert abs(calculate_sgpa('A', 'C', 'F') - 2.0) < epsilon
Beispiel #4
0
def test_sgpa_int_1():
    assert abs(calculate_sgpa('A', 'A', 'C') - 3.3333) < epsilon
def test_sgpa_int_6():
    assert abs(calculate_sgpa('C-', 'nothing', 'B+') - 2.5) < epsilon
def test_sgpa_int_5():
    assert abs(calculate_sgpa('C-', 'D+', 'nothing') - 1.5) < epsilon
def test_sgpa_int_3():
    assert abs(calculate_sgpa('nothing', 'B+', 'A') - 3.665) < epsilon
def test_sgpa_int_2():
    assert abs(calculate_sgpa('nothing', 'A', 'nothing') - 4.0) < epsilon