def test_getInheritance_3(self): _input = [['ArithmeticError'], ['ZeroDivisionError', ':', 'ArithmeticError']] _Expected = { 'ArithmeticError': [], 'ZeroDivisionError': ['ArithmeticError'] } _Actual = Exceptions.getInheritance(_input) self.assertDictEqual(_Actual, _Expected)
def test_getInheritance_2(self): _input = [['base'], ['second', ':', 'base'], ['otherbase'], ['first', ':', 'otherbase']] _Expected = { 'base': [], 'second': ['base'], 'otherbase': [], 'first': ['otherbase'] } _Actual = Exceptions.getInheritance(_input) self.assertDictEqual(_Actual, _Expected)
def test_getInheritance_1(self): _input = [['BaseException'], ['Exception', ':', 'BaseException'], ['LookupError', ':', 'Exception'], ['KeyError', ':', 'LookupError']] _Expected = { 'BaseException': [], 'Exception': ['BaseException'], 'LookupError': ['Exception'], 'KeyError': ['LookupError'], } _Actual = Exceptions.getInheritance(_input) self.assertDictEqual(_Actual, _Expected)