Skip to content

Commit

Permalink
src/sage/doctest/forker.py: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
orlitzky committed Oct 16, 2024
1 parent 7726cd9 commit dbbe497
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/sage/doctest/forker.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,13 @@ def compiler(example):
self.compile_and_execute(example, compiler, test.globs)
except SystemExit:
raise
except BaseException:
except BaseException as e:

# Tests can be killed by signals in unexpected places.
from cysignals.signals import SignalError
if isinstance(e, SignalError):
raise e

exception = sys.exc_info()
# On Python 2, the exception lives in sys.exc_info() as
# long we are in the same stack frame. To ensure that
Expand Down

0 comments on commit dbbe497

Please sign in to comment.