diff options
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r-- | Lib/test/test_weakref.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index a4fb7f333cf..f5114b26ce0 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -701,6 +701,12 @@ class Object: self.arg = arg def __repr__(self): return "<Object %r>" % self.arg + def __lt__(self, other): + if isinstance(other, Object): + return self.arg < other.arg + return NotImplemented + def __hash__(self): + return hash(self.arg) class MappingTestCase(TestBase): |