-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Test formatting platform #8719
Test formatting platform #8719
Conversation
@max-sixty (answering to your comment on the previous merged PR #8702) I created an issue on numpy, to propose an option to force print the dtype, that could be useful in a testing context numpy/numpy#25787 I thought about regexps too but... this it adds more complex and more error-prone logic to the tests, results are also less human-readable, and In this draft PR, I wrote 3 tests:
We can see that in our CI, the most problematic dtypes are integers Unsigned integers do not pose any problem as they are always printed out in a repr. Also, as they weigh as much as their signed counterpart, they are good candidates to:
|
Yes very impressive tests! I like the idea of using unsigned ints, that's a great idea. If you're up for doing that, I would vote for that option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might be over testing here, such that if we make another change then it'll be a lot of work to update! But that's hardly a primary concern, and very much appreciate the work to refactor the initial OS-dependent tests @etienneschalk . Thank you!
Follow up #8702 / #8702 (comment)
The goal is to remove the not elegant OS-dependant checks introduced during the testing of #8702
A simple way to do so is to use unsigned integer as dtypes for tests involving data array representations on multiple OSes. Indeed, this solves the issue of the default dtypes being not printed in the repr, with default dtyps varying according to the OS. The tests show that the concerned dtypes are
int32
(for the Windows CI) andint64
(for Ubuntu and macOS CIs). Usinguint64
should fix both the varying size and the varying numpy array repr.- [ ] Closes #xxxx- [ ] User visible changes (including notable bug fixes) are documented inwhats-new.rst
- [ ] New functions/methods are listed inapi.rst