Skip to content

Commit

Permalink
Update test_course.py to add tests for zero students (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
YourLocalMedic authored Nov 29, 2024
1 parent 94d63bd commit ffa0d98
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_course.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def test_remove_empty_course_raises_value_error(self):
student = Student("Bob", "Smith", 123456789)
with self.assertRaises(ValueError):
course.remove(student)

def test_contains_empty_course_returns_false(self):
course = Course("CS101")
student_not_there = Student("Not", "There", 918273645)
self.assertFalse(course.contains(student_not_there))

def test_repr_empty_course_returns_empty_string(self):
course = Course("CS101")
Expand Down

0 comments on commit ffa0d98

Please sign in to comment.