Test to check that report exception works with and without sys.exc_info