Skip to content

Commit

Permalink
TDD Pandas - [REFACTOR] Extract generate grade book function
Browse files Browse the repository at this point in the history
  • Loading branch information
diligejy committed Jan 19, 2024
1 parent 5fe340c commit 520f504
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PyCon_PL/Test_Driven_Pandas/tests/test_gradebook.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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]

0 comments on commit 520f504

Please sign in to comment.