Skip to content

TST, BUG: Re-raise MemoryError exception in test_large_zip's process#16905

Merged
charris merged 1 commit into
numpy:maintenance/1.19.xfrom
charris:backport-16890
Jul 19, 2020
Merged

TST, BUG: Re-raise MemoryError exception in test_large_zip's process#16905
charris merged 1 commit into
numpy:maintenance/1.19.xfrom
charris:backport-16890

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Jul 19, 2020

Backport of #16890.

Since #15893, test_large_zip's actual test is run in a child process,
so when this test raises a MemoryError exception, the exception is
lost and the @requires_memory decorator can't catch it to return
an xfail.

This commit uses a boolean variable in shared memory to flag if
the exception was raised, and in that case, re-raise it in the
parent process.

Fixes #16889

…umpygh-16890)

Since numpy#15893, test_large_zip's actual test is run in a child process,
so when this test raises a MemoryError exception, the exception is
lost and the @requires_memory decorator can't catch it to return
an xfail.

This commit uses a boolean variable in shared memory to flag if
the exception was raised, and in that case, re-raise it in the
parent process.

Fixes numpy#16889
@charris charris added this to the 1.19.1 release milestone Jul 19, 2020
@charris charris closed this Jul 19, 2020
@charris charris reopened this Jul 19, 2020
@charris charris merged commit e417420 into numpy:maintenance/1.19.x Jul 19, 2020
@charris charris deleted the backport-16890 branch July 19, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants