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

BUG: Fix matrix PendingDeprecationWarning suppression for pytest 3.8+. #11902

Merged
merged 1 commit into from Sep 8, 2018

Conversation

Projects
None yet
1 participant
@charris
Copy link
Member

commented Sep 7, 2018

Backport of #11896.

Pytest < 3.8 ignored warnings issued during test collection, but that
changed in pytest 3.8 and the method NumPy used to suppress the
PendingDeprecationWarning for matrices no longer worked, or rather, was
exposed as not working. The fix here is to suppress the warning in
pytest.ini and pytesttester.py , which should work as long as the tests
are the only places left where NumPy uses matrices.

An alternate fix is to delay the construction of matrices in the tests
until they are actually run, which has the virtue of test localization
but is a bit more complicated.

See pytest-dev/pytest#3945 for discussion.

BUG: Fix matrix PendingDeprecationWarning suppression for pytest 3.8+.
Pytest < 3.8 ignored warnings issued during test collection, but that
changed in pytest 3.8 and the method NumPy used to suppress the
PendingDeprecationWarning for matrices no longer worked, or rather, was
exposed as not working. The fix here is to suppress the warning in
pytest.ini and pytesttester.py , which should work as long as the tests
are the only places left where NumPy uses matrices.

An alternate fix is to delay the construction of matrices in the tests
until they are actually run, which has the virtue of test localization
but is a bit more complicated.

See pytest-dev/pytest#3945 for discussion.

@charris charris added this to the 1.15.2 release milestone Sep 7, 2018

@charris charris added the 05 - Testing label Sep 7, 2018

@charris charris merged commit 91d1b63 into numpy:maintenance/1.15.x Sep 8, 2018

6 checks passed

LGTM analysis: C/C++ No alert changes
Details
LGTM analysis: JavaScript No alert changes
Details
LGTM analysis: Python No alert changes
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@charris charris deleted the charris:fix-pytest-failures branch Sep 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.