示例#1
0
    def test_interface_types_work(self):
        class DummyInterface(InterfaceBase):
            pass

        self.assertTrue(is_interface(DummyInterface))
示例#2
0
 def test_arbitrary_types_fail(self):
     self.assertFalse(is_interface(type(3.0)))
     self.assertFalse(is_interface(property))
示例#3
0
 def test_interface_base_is_ignored(self):
     self.assertFalse(is_interface(InterfaceBase))
     self.assertFalse(is_interface(StreamInterface))
示例#4
0
 def test_not_a_type_returns_false(self):
     self.assertFalse(is_interface(0.0))
     self.assertFalse(is_interface(None))