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

fix tests for python 3.5

parent 8cc86927
No related branches found
No related tags found
No related merge requests found
......@@ -41,18 +41,7 @@ class TestMetaclasses(unittest.TestCase):
class BaseClass(abc.ABC):
pass
def property_wrapper(prop):
class Property(property):
__isabstractmethod__ = False
@rethrow_as(ValueError, KeyError)
def __get__(self, instance, owner):
v = prop.__get__(instance, owner)
logger.warning(f'Returning {v}')
return v
return wraps(prop)(Property())
property_wrapper = wrap_property(lambda fun: rethrow_as(ValueError, KeyError)(fun))
class Doubles(BaseClass, metaclass=wrap_with(callables=double,
properties=property_wrapper,
......
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