@pytest.mark.skipif(u'sys.version_info[:2] >= (3, 5)', reason=u'Infinite recursion on Python 3.5')
@pytest.mark.xfail(str(u'ip is not None'))
def test_exception_logging_argless_exception():
 try:
  log.enable_exception_logging()
  with log.log_to_list() as log_list:
   raise Exception()
 except Exception as exc:
  sys.excepthook(*sys.exc_info())
 else:
  assert False
 assert (len(log_list) == 1)
 assert (log_list[0].levelname == u'ERROR')
 assert (log_list[0].message == u'Exception [astropy.tests.test_logger]')
 assert (log_list[0].origin == u'astropy.tests.test_logger')

@ pytest . mark . skipif ( u'sys.version_info[:2] >= (3, 5)' , reason = u'Infinite recursion on Python 3.5' ) @ pytest . mark . xfail ( str ( u'ip is not None' ) ) def test_exception_logging_argless_exception ( ) : try : log . enable_exception_logging ( ) with log . log_to_list ( ) as log_list : raise Exception ( ) except Exception as exc : sys . excepthook ( * sys . exc_info ( ) ) else : assert False assert ( len ( log_list ) == 1 ) assert ( log_list [ 0 ] . levelname == u'ERROR' ) assert ( log_list [ 0 ] . message == u'Exception [astropy.tests.test_logger]' ) assert ( log_list [ 0 ] . origin == u'astropy.tests.test_logger' )
regression test for a crash that occurred on python 3 when logging an exception that was instantiated with no arguments regression test for URL .