Skip to content
Snippets Groups Projects
Commit a9b866bd authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

improve HashableWrapper + multiple bugfixes for Proxy

parent be3a87f6
No related branches found
No related tags found
No related merge requests found
# v2.7.14
* _TBA_
* multiple bugfixes for `Proxy` object
* bugfix for `HashableWrapper`: now it works
# v2.7.13
......
__version__ = '2.7.14_a1'
__version__ = '2.7.14_a2'
......@@ -17,6 +17,7 @@ class HashableWrapper(Proxy):
>>> a.a = 4
>>> assert a.a == 4
"""
__slots__ = ()
def __hash__(self):
return hash(id(self))
......@@ -117,7 +117,7 @@ class Proxy(tp.Generic[T]):
return self.__obj or other
def __and__(self, other):
return self.__obj or other
return self.__obj and other
def __le__(self, other):
return self.__obj <= other
......
......@@ -63,5 +63,5 @@ class TestMemory(unittest.TestCase):
self.assertTrue(a['memory'])
a['level_2_engaged'] = True
time.sleep(3)
self.assertEqual(a['times_entered_1'], 2)
self.assertEqual(a['times_entered_1'], 3)
self.assertTrue(a['level_2_confirmed'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment