From 520f5042939ed0f7f70d26eae17e737dead69d18 Mon Sep 17 00:00:00 2001 From: diligejy Date: Fri, 19 Jan 2024 21:17:45 +0900 Subject: [PATCH] TDD Pandas - [REFACTOR] Extract generate grade book function --- PyCon_PL/Test_Driven_Pandas/tests/test_gradebook.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PyCon_PL/Test_Driven_Pandas/tests/test_gradebook.py b/PyCon_PL/Test_Driven_Pandas/tests/test_gradebook.py index e555d9d..00ee733 100644 --- a/PyCon_PL/Test_Driven_Pandas/tests/test_gradebook.py +++ b/PyCon_PL/Test_Driven_Pandas/tests/test_gradebook.py @@ -1,5 +1,8 @@ import pandas as pd +def generate_gradebook(students_df:pd.DataFrame) -> dict[int, pd.DataFrame]: + return {} + def test_results_are_grouped_by_student_group(): students = [{ "ID" : 1, @@ -10,5 +13,5 @@ def test_results_are_grouped_by_student_group(): }] students_df = pd.DataFrame(data=students).set_index("ID") - result = {} + result = generate_gradebook(students_df=students_df) assert list(result.keys()) == [1] \ No newline at end of file