-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add missing CLI and INI options for a consistent API #181
Add missing CLI and INI options for a consistent API #181
Conversation
b83ea27
to
fe4f4e3
Compare
You can set these options in the pytest config (normally setup.cfg) but I don't know how that interacts with richer python objects? maybe we would need to parse a string in to a python object? |
The pytest global options (probably) only supports returning one of these types. So I think it would be best to just recommend adding custom rc params to a new style file within the test directory, whose path (or URL) can just be referred to in the global pytest option as a string. |
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.
These changes should get the tests passing. I think we should do a new major version soon with the default style changed from "classic"
to "default"
, as I think any changes to the Matplotlib default style are outside the scope of this package and should be made apparent by default when testing on different Matplotlib version.
Hi @astrofrog, there are some other options (noted in #198) which could be added to make the config more consistent. Do you agree we should add these options?
If so, would you like me to open a separate PR, or shall I just add them to this PR? |
Sounds good - feel free to just add them to this PR if you like! |
f43443e
to
718308a
Compare
using patterns from matplotlib#150
6fa164c
to
913c476
Compare
1096aae
to
fd3ca4e
Compare
Adds tests for the new config options across ini, CLI and kwarg where relevant. Asserts that they work and have the expected order of precedence. Still need to add dedicated tests for all the other options.
Adds tests for the new config options across ini, CLI and kwarg where relevant. Asserts that they work and have the expected order of precedence. Still need to add dedicated tests for all the other options.
fd3ca4e
to
a36ac38
Compare
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.
Thanks for all the work on this!
It would be nice to be able to customize the default tolerance and style to use globally as both have defaults set by 'historical reasons' that aren't necessarily sensible.
For style, one of the issues is that actually style could be more than just a string - e.g. a dict and so on. Is there a way to set global options such as these in e.g. conftest.py? (if so I can document that too).
Remaining TODOs (if we go ahead with this):