-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
- We should probably change "class attributes" to "instance attributes" in the error message of the
__str__and__repr__exercise:
python-tutorial/tutorial/tests/test_05_object_oriented_programming.py
Lines 148 to 163 in 09b391d
| def validate_oop_str_method(solution_result): | |
| assert hasattr(solution_result.__str__, "__closure__"), ( | |
| "Make sure that the class is properly implementing the __str__() method." | |
| ) | |
| assert solution_result.__str__.__closure__ is None, ( | |
| "The __str__() method should be using the class attributes." | |
| ) | |
| def validate_oop_repr_method(solution_result): | |
| assert hasattr(solution_result.__repr__, "__closure__"), ( | |
| "Make sure that the class is properly implementing the __repr__() method." | |
| ) | |
| assert solution_result.__repr__.__closure__ is None, ( | |
| "The __repr__() method should be using the class attributes." | |
| ) |