Skip to content

Collecting test fails with python3.5 #4256

Closed

Description

@jlec
========================================= test session starts ==========================================
platform linux -- Python 3.5.0, pytest-2.8.2, py-1.4.30, pluggy-0.3.1

Running tests with Astropy version 1.0.5.
Running tests in /var/tmp/portage/dev-python/astropy-1.0.5/temp/astropy-test-g75lcjj5/lib.linux-x86_64-3.5/astropy /var/tmp/portage/dev-python/astropy-1.0.5/temp/astropy-test-g75lcjj5/docs.

Platform: Linux-4.1.9-lh-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2

Executable: /usr/bin/python3.5

Full Python Version:
3.5.0 (default, Oct 20 2015, 11:36:04)
[GCC 4.9.3]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Numpy: 1.10.1
Scipy: 0.16.0
Matplotlib: 1.4.3
h5py: 2.5.0
Running doctests in .rst files is not supported on Python 3.x

rootdir: /var/tmp/portage/dev-python/astropy-1.0.5/temp/astropy-test-g75lcjj5, inifile: setup.cfg
plugins: cov-2.2.0
collected 0 items / 1 errors

================================================ ERRORS =================================================
___________________________________________ ERROR collecting  ___________________________________________
/usr/lib64/python3.5/site-packages/py/_path/common.py:332: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/usr/lib64/python3.5/site-packages/py/_path/common.py:378: in gen
    for p in self.gen(subdir):
/usr/lib64/python3.5/site-packages/py/_path/common.py:367: in gen
    dirs = self.optsort([p for p in entries
/usr/lib64/python3.5/site-packages/py/_path/common.py:368: in <listcomp>
    if p.check(dir=1) and (rec is None or rec(p))])
/usr/lib64/python3.5/site-packages/_pytest/main.py:649: in _recurse
    ihook = self.gethookproxy(path)
/usr/lib64/python3.5/site-packages/_pytest/main.py:552: in gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
/usr/lib64/python3.5/site-packages/_pytest/config.py:296: in _getconftestmodules
    mod = self._importconftest(conftestpath)
/usr/lib64/python3.5/site-packages/_pytest/config.py:321: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   _pytest.config.ConftestImportFailure: (local('/var/tmp/portage/dev-python/astropy-1.0.5/temp/astropy-test-g75lcjj5/lib.linux-x86_64-3.5/astropy/table/tests/conftest.py'), (<class 'DeprecationWarning'>, DeprecationWarning('bad escape \\s',), <traceback object at 0x2b34ac8af048>))
======================================== 1 error in 0.29 seconds =======================================

Activity

  1. jlec commented on Oct 21, 2015

    @jlec
    Author

    If I run

    ./setup.py test --test=astropy/table/tests/conftest.py

    I see

    ================================================ ERRORS =================================================
    _________________ ERROR collecting lib.linux-x86_64-3.5/astropy/table/tests/conftest.py _________________
    astropy/tests/pytest_plugins.py:124: in collect
        module = self.config._conftest.importconftest(self.fspath)
    E   AttributeError: 'Config' object has no attribute '_conftest'
    ======================================== 1 error in 0.06 seconds ========================================
  2. embray commented on Oct 22, 2015

    @embray
    Member

    What was the first command you ran?

  3. embray commented on Oct 22, 2015

    @embray
    Member

    I wonder if this is an issue with py.test 2.8.x. The version astropy has been tested with is 2.7.x, but it looks like there could be a problem with 2.8.

    Did you install astropy yourself, or from a system package? Normally astropy's tests run with its bundled copy of py.test, unless you explicitly set ASTROPY_USE_SYSTEM_PYTEST

  4. jlec commented on Oct 22, 2015

    @jlec
    Author

    What was the first command you ran?

    ./setup.py test

    Did you install astropy yourself, or from a system package? Normally astropy's tests run with its
    bundled copy of py.test, unless you explicitly set ASTROPY_USE_SYSTEM_PYTEST

    I am packaging astropy for Gentoo Linux. We are trying to use system packages as much as possible. Especially pytest shouldn't create a problem. I will test it with pytest-2.7* and report back. In case this a problem with pytest version we should report it to them. They always strive to have maximum backwards compatibility.

  5. embray commented on Oct 22, 2015

    @embray
    Member

    Ah, okay. Thanks for the info. We just recently updated even to pytest 2.7, but 2.8 came out shortly after that. If there are some things we need to fix for compatibility with pytest 2.8 that would be good to do anyways.

  6. jlec commented on Oct 23, 2015

    @jlec
    Author

    So, on
    python-3.4 and pytest-2.8.2 gives

    ========================================================================== ERRORS ===========================================================================
    _________________________________________________ ERROR collecting lib.linux-x86_64-3.4/astropy/conftest.py _________________________________________________
    astropy/tests/pytest_plugins.py:124: in collect
        module = self.config._conftest.importconftest(self.fspath)
    E   AttributeError: 'Config' object has no attribute '_conftest'
    ___________________________________________ ERROR collecting lib.linux-x86_64-3.4/astropy/table/tests/conftest.py ___________________________________________
    astropy/tests/pytest_plugins.py:124: in collect
        module = self.config._conftest.importconftest(self.fspath)
    E   AttributeError: 'Config' object has no attribute '_conftest'
    ======================================== 6162 passed, 102 skipped, 41 xfailed, 2 xpassed, 2 error in 177.94 seconds =========================================

    python-3.4 and python-2.7 is fine.

    For python-3.5 both pytest versions show the initial error.

  7. astrofrog commented on Jan 30, 2016

    @astrofrog
    Member

    I fixed this in #4349, which still needs to be merged.

  8. keflavich commented on Feb 12, 2016

    @keflavich
    Contributor

    I'm seeing this same issue on a recently-astropy-templated repository:
    https://travis-ci.org/keflavich/image_registration/jobs/108825570#L597

    @astrofrog if this is the same issue, can #4349 be merged soon? Is there any workaround? I don't think I'm running the tests twice in this case, so it's not really a corner case any more, but I don't understand the issue deeply.

  9. eteq commented on Feb 12, 2016

    @eteq
    Member

    I think this is fixed by #4349, so closing. But if it turns out not to fix it, feel free to re-open! Similarly, if the problem in image_registration isn't fixed, @keflavich, feel free to re-open (or open a new one tailored to that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions