2👍
✅
Percentage is a method so you need to call it
self.assertEqual(Score.percentage, 100)
should be
self.assertEqual(Score.percentage(), 100)
Note: it still won’t work correctly though since you need to call the method on an instance of score, and call the instances score (self.score
) inside of the method instead of score.
Source:stackexchange.com