Skip to content

Circular import problem in 6.0?! #7487

@ionelmc

Description

@ionelmc

So I'm getting this incredibly vague error for some tests in pytest-cov:

ImportError while importing test module '/tmp/pytest-of-travis/pytest-0/test_dist_not_collocated0/dir2/test_dist_not_collocated.py'.

Hint: make sure your test modules/packages have valid Python names.

Traceback:

/home/travis/build/pytest-dev/pytest-cov/.tox/py36-pytest60-xdist33-coverage52/lib/python3.6/importlib/__init__.py:126: in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

__init__.py:5: in <module>

    from . import collect

E   ImportError: cannot import name 'collect'

Only happens with xdist on.

Hoping this is enough clue to the problem, if not I guess I'll look some more and make a simple reproducer ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions