Пример #1
0
 def test_quietly_logs_unapproved_errors(self):
     decorator = decorators.only_raises(IOError)
     decorated_meth = decorator(self.raise_ZeroDivisionError)
     self.assertLogsError(ZeroDivisionError, decorated_meth)
Пример #2
0
 def test_quietly_logs_unapproved_errors(self):
     decorator = decorators.only_raises(IOError)
     decorated_meth = decorator(self.raise_ZeroDivisionError)
     self.assertLogsError(ZeroDivisionError, decorated_meth)
Пример #3
0
 def test_raises_approved_error(self):
     decorator = decorators.only_raises(ZeroDivisionError)
     decorated_meth = decorator(self.raise_ZeroDivisionError)
     self.assertRaises(ZeroDivisionError, decorated_meth)
Пример #4
0
 def test_raises_approved_error(self):
     decorator = decorators.only_raises(ZeroDivisionError)
     decorated_meth = decorator(self.raise_ZeroDivisionError)
     self.assertRaises(ZeroDivisionError, decorated_meth)