desihub / specsim

Quick simulations of spectrograph response
2 stars 10 forks source link

specsim/master + astropy/2.0.9 + pytest/5.0.1 = massive failures #106

Closed sbailey closed 4 months ago

sbailey commented 5 years ago

There is some incompatibility in the testing infrastructure with the combination specsim/master + astropy/2.0.9 + pytest/5.0.1, with many errors of the form listed below. Downgrading to pytest/3.6.2 works. i.e. the problem is with the testing infrastructure / configuration, not with the specsim code itself.

I see that there are several astropy-infrastructure pull requests open on specsim; it is possible that merging those would already fix this.

___________________________ ERROR at setup of [doctest] docs/index.rst ___________________________

self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <DocTestTextfilePlus docs/index.rst>}, notincall = set()

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

/global/common/software/desi/cori/desiconda/20190730-1.3.0-spec/conda/lib/python3.6/site-packages/pluggy/hooks.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.config.PytestPluginManager object at 0x2aaab97b30f0>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/global/common/software/desi/cori/desiconda/2019073.../common/software/desi/cori/desiconda/20190730-1.3.0-spec/conda/lib/python3.6/site-packages/_pytest/skipping.py'>>, ...]
kwargs = {'item': <DocTestTextfilePlus docs/index.rst>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

/global/common/software/desi/cori/desiconda/20190730-1.3.0-spec/conda/lib/python3.6/site-packages/pluggy/manager.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/global/common/software/desi/cori/desiconda/2019073.../common/software/desi/cori/desiconda/20190730-1.3.0-spec/conda/lib/python3.6/site-packages/_pytest/skipping.py'>>, ...]
kwargs = {'item': <DocTestTextfilePlus docs/index.rst>}

    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
>       firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

/global/common/software/desi/cori/desiconda/20190730-1.3.0-spec/conda/lib/python3.6/site-packages/pluggy/manager.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <DocTestTextfilePlus docs/index.rst>

    def pytest_runtest_setup(item):

>       remote_data = item.get_marker('remote_data')
E       AttributeError: 'DocTestTextfilePlus' object has no attribute 'get_marker'

/global/common/software/desi/cori/desiconda/20190730-1.3.0-spec/conda/lib/python3.6/site-packages/astropy/extern/plugins/pytest_remotedata/plugin.py:64: AttributeError
weaverba137 commented 4 years ago

Note that astropy 2 is only compatible with pytest < 3.7.

weaverba137 commented 4 months ago

I don't think this ticket is relevant any longer.