Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jul 19, 2020

Conversation

charris
Copy link
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.

None yet

2 participants