Hi, I managed to reproduce the bug.
According to my investigations, it is caused by a change in pytest (fails with version 2.8). The current version of astropy available in Debian does not take this change into account (see upstream discussion at https://github.com/astropy/astropy/issues/4256) and thus make astroquery tests fail.
I managed to get rid of the bug by modifying the offending line (164) in /usr/lib/usr/lib/python2.7/dist-packages/astropy/tests/pytest_plugins.py:
- module = self.config._conftest.importconftest(self.fspath) + module = self.config.pluginmanager._importconftest(self.fspath) as it is in the file doctest.py of python-pytest (line 172). Best regards, Vincent