コード例 #1
0
def test_calculate_sgpa_weighted_s_6():
    try:
        calculate_sgpa_weighted(None) == None
        assert False
    except TypeError:
        return

    assert False
コード例 #2
0
def test_calculate_sgpa_weighted_s_8():
    assert calculate_sgpa_weighted(['D+', 'A-', 'C+', 'X'],
                                   [3, 3, 1, 2]) == None
コード例 #3
0
def test_calculate_sgpa_weighted_s_7():
    assert abs(
        calculate_sgpa_weighted(['B+', 'C-', 'A+', 'C-'], [3, 1, 3, 4]) -
        2.75) < epsilon
コード例 #4
0
def test_calculate_sgpa_weighted_s_4():
    assert abs(calculate_sgpa_weighted(['D+', 'C+'], [3, 1]) - 1.58) < epsilon
コード例 #5
0
def test_calculate_sgpa_weighted_s_5():
    assert calculate_sgpa_weighted(['B', 'C-'], [3]) == None
コード例 #6
0
def test_calculate_sgpa_weighted_s_2():
    assert calculate_sgpa_weighted('B', 3) == 3.0
コード例 #7
0
def test_calculate_sgpa_weighted_s_3():
    assert abs(calculate_sgpa_weighted(['A', 'B'], [4, 3]) - 3.57) < epsilon
コード例 #8
0
def test_calculate_sgpa_weighted_i_9():
    assert calculate_sgpa_weighted(['T', 'A-', 'C+', 'G'],
                                   [3, 3, 1, 2]) == None
コード例 #9
0
def test_calculate_sgpa_weighted_s_1():
    assert calculate_sgpa_weighted('A+', 4) == 4.0
コード例 #10
0
def test_calculate_sgpa_weighted_i_6():
    assert calculate_sgpa_weighted(['A'], [1, 6]) == None
コード例 #11
0
def test_calculate_sgpa_weighted_i_5():
    assert calculate_sgpa_weighted(['A', 'D-'], [1]) == None
コード例 #12
0
def test_calculate_sgpa_weighted_i_3():
    assert abs(calculate_sgpa_weighted(['D+', 'C-'], [3, 4]) - 1.52) < epsilon
コード例 #13
0
def test_calculate_sgpa_weighted_i_2():
    assert calculate_sgpa_weighted('C-', 3) == 1.67
コード例 #14
0
def test_calculate_sgpa_weighted_i_1():
    assert calculate_sgpa_weighted('D+', 4) == 1.33