def test_calculate_sgpa_1_1():
    assert abs(
        calculate_sgpa(['D+', 'A-', 'B+', 'D+', 'C+', 'A-', 'A+']) -
        2.80) < epsilon
def test_calculate_sgpa_1_2():
    assert calculate_sgpa([]) == 0
def test_calculate_sgpa_7():
    assert calculate_sgpa(['C+', 'B+', 'C-', 'D+']) == 2.165
def test_calculate_sgpa_8():
    assert calculate_sgpa(['A', 'B-', 'C-', 'D+']) == 2.4175
def test_calculate_sgpa_11():
    assert calculate_sgpa(['P', 'A', 'C-', 'D+', 'C']) == None
def test_calculate_sgpa_6():
    assert calculate_sgpa(['A', 'B', 'C', 'D']) == 2.5
def test_calculate_sgpa_3():
    assert calculate_sgpa(['D', 'A', 'C-', 'D+', 'C']) == 2.0
def test_calculate_sgpa_1_5():
    assert calculate_sgpa('B+') == 3.33
def test_calculate_sgpa_9():
    assert calculate_sgpa(['A', 'A-', 'A-', 'D+']) == 3.1675
def test_calculate_sgpa_2():
    assert calculate_sgpa(['A+', 'A', 'A', 'C', None]) == None
def test_calculate_sgpa_2_5():
    assert calculate_sgpa('C-') == 1.67
def test_calculate_sgpa_2_4():
    assert calculate_sgpa('D+') == 1.33
def test_calculate_sgpa_2_3():
    assert calculate_sgpa('A+') == 4.0
def test_calculate_sgpa_1_3():
    assert calculate_sgpa(None) == None
def test_calculate_sgpa_4():
    assert calculate_sgpa(['D', 'A', 'C-', 'D+', 'X']) == None
def test_calculate_sgpa_1_4():
    assert calculate_sgpa('B') == 3.0
def test_calculate_sgpa_5():
    assert calculate_sgpa(['D', 'A', 'C-', 'D+', 1.0]) == None
def test_calculate_sgpa_1():
    assert calculate_sgpa(['A+', 'A', 'A', 'D']) == 3.25
def test_calculate_sgpa_10():
    assert calculate_sgpa(['C+', 'B', 'D', 'C', None]) == None