Пример #1
0
 def test_getExtra_1(self):
     _inh = {
         'ArithmeticError': [],
         'ZeroDivisionError': ['ArithmeticError']
     }
     _catches = ['ArithmeticError', 'ZeroDivisionError']
     _Expected = {'ArithmeticError': False, 'ZeroDivisionError': True}
     _Actual = Exceptions.getExtra(_inh, _catches)
     print("Actual: ", _Actual)
     self.assertDictEqual(_Actual, _Expected)
Пример #2
0
 def test_getExtra_2(self):
     _inh = {
         'base': [],
         'second': ['base'],
         'otherbase': [],
         'first': ['otherbase']
     }
     # _catches = ['base', 'otherbase', 'first', 'second']
     # _Expected =  {'base': False, 'otherbase': False, 'first': True, 'second': True}
     _catches = ['otherbase', 'first']
     _Expected = {'otherbase': False, 'first': True}
     _Actual = Exceptions.getExtra(_inh, _catches)
     print("Actual: ", _Actual)
     self.assertDictEqual(_Actual, _Expected)