These are chat archives for astropy/astropy

Jun 2016
Erik Tollerud
Jun 06 2016 23:33
@yeganer - I’m not 100% sure about this, but I think if you provide your own plugin, you can give it its own pytest_addoption
as long as you aren’t specifically trying to modify the helpers’ machinery, that’s almost certainly going to be safer and easier
Erik Tollerud
Jun 06 2016 23:38
oh, wait, I think I see the problem with that as-is, @yeganer : you’d have to modify your package’s to use that, andpytest_addoptionis already in there from the helpers.
to get it working right now I’d guess you’re best off doing something like this in :
from astropy.tests.pytest_plugins import *
aph_pytest_addoption = pytest_addoption

from mypackage.pytest_plugins import *
my_pytest_addoption =  pytest_addoption

def pytest_addoption(parser):

I don’t see a downside to trying to support that more “cleverly” a la how PYTEST_HEADER_MODULES works, but something like that will need to be done anyway to support this