Esempio n. 1
0
    def test_interface_types_work(self):
        class DummyInterface(InterfaceBase):
            pass

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