def test_calculate_manager_points_with_all_scores_draw(): test_score_data = [ { 'GameWeek': 1, 'Test Score': 71, 'Test 2 Score': 71, 'Test 3 Score': 71 }, ] result = calculate_manager_points(test_score_data) assert result == {'Test Score': 1, 'Test 2 Score': 1, 'Test 3 Score': 1}
def test_calculate_manager_points_no_draw(): test_score_data = [{ 'GameWeek': 1, 'Test Score': 71, 'Test 2 Score': 26, 'Test 3 Score': 70 }, { 'GameWeek': 2, 'Test Score': 50, 'Test 2 Score': 80, 'Test 3 Score': 30 }] result = calculate_manager_points(test_score_data) assert result == {'Test Score': 3, 'Test 2 Score': 2, 'Test 3 Score': 1}
def test_calculate_manager_points_with_multiple_scores_draw_second_place(): test_score_data = [ { 'GameWeek': 1, 'Test Score': 75, 'Test 2 Score': 71, 'Test 3 Score': 71, 'Test 4 Score': 71, 'Test 5 Score': 70 }, ] result = calculate_manager_points(test_score_data) assert result == { 'Test Score': 2, 'Test 2 Score': 0.33, 'Test 3 Score': 0.33, 'Test 4 Score': 0.33, 'Test 5 Score': 0 }