From 15dde27e5e14270f8e8837abe26c4ea1710bf053 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 21 Oct 2014 11:41:53 -0700 Subject: Fix for abstractproperty, and make things nicer --- tests/test_interfaces.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py index bcc1010a..e24f4db2 100644 --- a/tests/test_interfaces.py +++ b/tests/test_interfaces.py @@ -51,3 +51,18 @@ class TestVerifyInterface(object): with pytest.raises(InterfaceNotImplemented): verify_interface(SimpleInterface, NonImplementer) + + def test_handles_abstract_property(self): + @six.add_metaclass(abc.ABCMeta) + class SimpleInterface(object): + @abc.abstractproperty + def property(self): + pass + + @register_interface(SimpleInterface) + class NonImplementer(object): + @property + def property(self): + pass + + verify_interface(SimpleInterface, NonImplementer) -- cgit v1.2.3