File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -844,6 +844,8 @@ def ensure_interruptible_after(seconds: float, max_wait_after_interrupt: float =
844844 ....: if start_time.tv_sec > target_time.tv_sec or (start_time.tv_sec == target_time.tv_sec and start_time.tv_nsec >= target_time.tv_nsec):
845845 ....: break
846846 ....: ''')
847+ sage: import gc
848+ sage: gc.disable()
847849 sage: with ensure_interruptible_after(2) as data: interruptible_sleep(1r)
848850 Traceback (most recent call last):
849851 ...
@@ -860,6 +862,7 @@ def ensure_interruptible_after(seconds: float, max_wait_after_interrupt: float =
860862 RuntimeError: Function is not interruptible within 1.0000 seconds, only after 2.00... seconds
861863 sage: data # abs tol 0.01
862864 {'alarm_raised': True, 'elapsed': 2.0}
865+ sage: gc.enable()
863866
864867 ::
865868
You can’t perform that action at this time.
0 commit comments