Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TST: Skip ctypes dependent test that fails on Python < 2.7.7. #11159

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

Merged
merged 1 commit into from
May 25, 2018

Conversation

mattip
Copy link
Member

@mattip mattip commented May 25, 2018

Fixes #11115 related to #11150

Python before 2.7.7 had a broken ctypes memoryview format for multi-demensional arrays. Skip the test

@@ -6517,6 +6517,7 @@ def test_max_dims(self):
a = np.empty((1,) * 32)
self._check_roundtrip(a)

#pytest.mark.skipif(sys.version_info < (2, 7, 7), reason="ctypes issue")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be @. May as well link to the bpo bug in the reason.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gaaah, changed

@mattip mattip force-pushed the skip-ctypes-issue branch from 7a4d831 to ab92f58 Compare May 25, 2018 02:52
@mattip mattip force-pushed the skip-ctypes-issue branch from ab92f58 to c4813a9 Compare May 25, 2018 03:00
@@ -6517,6 +6517,7 @@ def test_max_dims(self):
a = np.empty((1,) * 32)
self._check_roundtrip(a)

@pytest.mark.skipif(sys.version_info < (2, 7, 7), reason="See gh-11115")
Copy link
Member

@eric-wieser eric-wieser May 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer either:

  • relies on bpo-10744 being fixed
  • relies on https://bugs.python.org/issue10744 being fixed

At any rate, we can just refer to the python issue here - the github one is not interesting

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eric-wieser The Python issue seems a bit less discoverable and the numpy reference has a fair amount of useful discussion. Given that we will drop 2.7 support at the end of the year, probably not worth spending much time on this. If nothing else, git blame will lead back here.

@eric-wieser
Copy link
Member

Again, the commit message is a little vague here. Possibly better would be something like

BUG: skip test that fails due to broken ctypes

Until python 2.7.7, memoryview.format was incorrect for arrays (https://bugs.python.org/issue10744)

Fixes gh-11115

@eric-wieser
Copy link
Member

related to #11150

Not really - only related in that the two independent regressions were introduced at the same time

@charris charris changed the title TST: skip ctypes memoryview issue on old python TST: Skip ctypes dependent test that fails on Python < 2.7.7. May 25, 2018
@charris charris merged commit 0dfb8f0 into numpy:master May 25, 2018
@mattip mattip deleted the skip-ctypes-issue branch October 9, 2018 17:20
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.

3 participants