def test_interface_types_work(self): class DummyInterface(InterfaceBase): pass self.assertTrue(is_interface(DummyInterface))
def test_arbitrary_types_fail(self): self.assertFalse(is_interface(type(3.0))) self.assertFalse(is_interface(property))
def test_interface_base_is_ignored(self): self.assertFalse(is_interface(InterfaceBase)) self.assertFalse(is_interface(StreamInterface))
def test_not_a_type_returns_false(self): self.assertFalse(is_interface(0.0)) self.assertFalse(is_interface(None))