@@ -0,0 +1,2190 @@
+import unittest%0Afrom fluentcheck.check import Check, CheckError%0A%0Aclass ParentA:%0A    def __init__(self):%0A        pass%0A%0Aclass Child(ParentA):%0A    def __init__(self):%0A        pass%0A%0Aclass GrandChild(Child):%0A    def __init__(self):%0A        pass%0A%0Aclass ParentB:%0A    def __init__(self):%0A        pass%0A%0Aclass ChildOfMultipleParents(ParentA, ParentB):%0A    def __init__(self):%0A        pass%0A%0Aclass TestTypeHierarchy(unittest.TestCase):%0A%0A    def test_is_subtype_of(self):%0A        res = Check(Child()).is_subtype_of(ParentA)%0A        self.assertIsInstance(res, Check)%0A        try:%0A            Check(ParentA()).is_subtype_of(Child)%0A            self.fail()%0A        except CheckError:%0A            pass%0A%0A    def test_is_subtype_of_when_grandchild_is_subtype_of_parent(self):%0A        res = Check(GrandChild()).is_subtype_of(ParentA)%0A        self.assertIsInstance(res, Check)%0A        try:%0A            Check(ParentA()).is_subtype_of(GrandChild)%0A            self.fail()%0A        except CheckError:%0A            pass%0A    %0A    def test_is_subtype_of_when_multiple_inheritance(self):%0A        res = Check(ChildOfMultipleParents()).is_subtype_of((ParentA, ParentB))%0A        self.assertIsInstance(res, Check)%0A        try:%0A            Check(ParentA()).is_subtype_of((ChildOfMultipleParents, ParentB))%0A            self.fail()%0A        except CheckError:%0A            pass%0A%0A    def test_is_not_subtype_of(self):%0A        res = Check(ParentA()).is_not_subtype_of(ParentB)%0A        self.assertIsInstance(res, Check)%0A        try:%0A            Check(Child()).is_not_subtype_of(ParentA)%0A            self.fail()%0A        except CheckError:%0A            pass%0A    %0A    def test_is_subtype_of_itself(self):%0A        res = Check(Child()).is_subtype_of(Child)%0A        self.assertIsInstance(res, Check)%0A        try:%0A            Check(Child()).is_not_subtype_of(Child)%0A            self.fail()%0A        except CheckError:%0A            pass%0A    %0A    def test_is_subtype_of_atleast_one_parent(self):%0A        res = Check(Child()).is_subtype_of((ParentA, ParentB))%0A        self.assertIsInstance(res, Check)%0A        try:%0A            Check(Child()).is_not_subtype_of((ParentA, ParentB))%0A            self.fail()%0A        except CheckError:%0A            pass

Add tests for type hierarchy