Add template to extend pytest_addoption #176
Conversation
This is related to issue #175 |
Maybe extend the comments a little more to suggest how one might use the extra option? |
This template shows how to extend pytest_functions defined in astropy.tests.pytest_plugins similiar to a super call in a class.
@pllim I extended the comments. Do you want an example how the additional option could be used, too?
|
Thanks. I meant something more like "after you added this option, this is how you add the code in your test to use that option for your test..." This is because people who use the template have varying Python proficiency, so we should be as user-friendly as possible. |
There are two ways one could show this. Which solution would you prefer to be in the example? |
Ideally both, so user can choose. But if that is too much trouble, links to existing doc on how to accomplish them are sufficient. |
I found a need for this and found out the following: >>> import packagename
>>> packagename.test(slow=True) # Error
>>> packagename.test(args='--slow') # Okay And also:
This should be documented as well, along with the |
We're moving over to cookicutter, so I'm closing old unresolved PRs. Please reopen against the cookicutter branch if you feel this is still relevant. |
This template shows how to extend pytest_functions defined in
astropy.tests.pytest_plugins similiar to a super call in a class.