Esempio n. 1
0
 def test_fatal_error(self):
     try:
         raise exc.ReframeFatalError('fatal error')
     except Exception:
         pytest.fail('fatal error should not derive from Exception')
     except BaseException:
         pass
Esempio n. 2
0
 def test_reraise_fatal_error(self):
     try:
         try:
             raise ValueError('random value error')
         except ValueError as e:
             # reraise as ReframeError
             raise exc.ReframeFatalError('fatal error') from e
     except exc.ReframeFatalError as e:
         assert 'fatal error: random value error' == str(e)