Make options more consistent
Some options are available only through the decorator (e.g. the style), while some are accessible as command-line options and one (the results dir) is also an ini option. We should make this more consistent so that e.g. styles can be set globally on the command-line or in an ini file.
@dopplershift - could you explain why you added mpl-results-path as an ini option in addition to a command-line option? I started adding other options as ini options but then noticed that most other plugins don't really do this, so I was wondering whether we even need ini options at all?
I like the ini options because it lets me put our standard workflow in setup.cfg, and then running our tests is just pytest or python setup.py test.
You don't need the ini option to use setup.cfg though since you could also add any option to the [pytest] section in setup.cfg anyway?
I have mpl-results-path listed under [tool:pytest] currently. I was under the impression that this didn't work until I added the ini section support for it. Am I mistaken?
@dopplershift - I have to double check, but I know for sure you can do:
[tool:pytest]
addopts = --mpl
without the ini.
I didn't know about addopts. That seems to work fine for my cases, so I'm ok with removing the direct ini options.
Ok, here's one reservation I have after working with addopts. The ini option specific to pytest-mpl is ignored if pytest-mpl isn't installed, whereas the addopts is always on. This produces errors if pytest-mpl isn't installed.