[py3] Fixed dispatch tests
This commit is contained in:
parent
27192564c3
commit
60f5e10230
|
@ -149,9 +149,11 @@ class BoundMethodWeakref(object):
|
|||
self.selfName,
|
||||
self.funcName,
|
||||
)
|
||||
|
||||
|
||||
__repr__ = __str__
|
||||
|
||||
|
||||
__hash__ = object.__hash__
|
||||
|
||||
def __bool__( self ):
|
||||
"""Whether we are still a valid reference"""
|
||||
return self() is not None
|
||||
|
|
|
@ -54,10 +54,8 @@ class SaferefTests(unittest.TestCase):
|
|||
sd[s] = 1
|
||||
for t in self.ts:
|
||||
if hasattr(t, 'x'):
|
||||
self.assertTrue(sd.has_key(safeRef(t.x)))
|
||||
self.assertTrue(safeRef(t.x) in sd)
|
||||
else:
|
||||
self.assertTrue(sd.has_key(safeRef(t)))
|
||||
self.assertTrue(safeRef(t) in sd)
|
||||
|
||||
def testRepresentation(self):
|
||||
|
|
Loading…
Reference in New Issue