Skip to content

Commit

Permalink
Fix tests with gmp 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-rojas committed Jul 31, 2023
1 parent 26f5a09 commit d88bc38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/sage/ext/memory.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Low-level memory allocation functions
TESTS:
Check that a ``MemoryError`` is raised if we try to allocate a
Check that an error is raised if we try to allocate a
ridiculously large integer, see :trac:`15363`::
sage: 2^(2^63-3)
Traceback (most recent call last):
...
OverflowError: exponent must be at most 2147483647 # 32-bit
RuntimeError: Aborted # 64-bit
sage: try:
....: 2^(2^63-3)
....: except (OverflowError, RuntimeError, FloatingPointError):
....: print ('Overflow error')
Overflow error
AUTHORS:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/integer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6654,7 +6654,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
sage: try:
....: print('Possible error output from gmp', flush=True)
....: 1 << (2^60)
....: except (MemoryError, OverflowError, RuntimeError):
....: except (MemoryError, OverflowError, RuntimeError, FloatingPointError):
....: pass
....: else:
....: print("Failed to raise exception")
Expand Down

0 comments on commit d88bc38

Please sign in to comment.