diff --git a/doc/en/assert.rst b/doc/en/assert.rst index c0576ec5d..3d1a00a70 100644 --- a/doc/en/assert.rst +++ b/doc/en/assert.rst @@ -200,7 +200,10 @@ now, given this test module:: # content of test_foocompare.py class Foo: def __init__(self, val): - self.val = val + self.val = val + + def __eq__(self, other): + return self.val == other.val def test_compare(): f1 = Foo(1)