Skip to content

Commit ceac4d7

Browse files
committed
Merge branch 'fix/13-object-oriented-advanced-notebook' of github.com:empa-scientific-it/python-tutorial into fix/13-object-oriented-advanced-notebook
2 parents cb6f8b7 + 15a8a55 commit ceac4d7

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tutorial/tests/test_13_object_oriented_programming_advanced.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,16 @@ def validate_child_eye_color(solution_result):
6161
attrs = list(vars(solution_result))
6262
except TypeError:
6363
raise SubAssertionError from None
64-
assert len(attrs) == 1, "The class should have 1 attribute."
65-
assert "eye_color" in attrs, "The class attribute should be 'eye_color'."
64+
assert len(attrs) == 3, "The class should have 3 attributes."
65+
assert "eye_color" in attrs, (
66+
"The class should have an attribute called 'eye_color'."
67+
)
68+
assert "eye_color_mother" in attrs, (
69+
"The class should have an attribute called 'eye_color_mother'."
70+
)
71+
assert "eye_color_father" in attrs, (
72+
"The class should have an attribute called 'eye_color_father'."
73+
)
6674

6775

6876
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)