Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular import problem in 6.0?! #7487

Closed
ionelmc opened this issue Jul 13, 2020 · 2 comments · Fixed by pytest-dev/pytest-xdist#558
Closed

Circular import problem in 6.0?! #7487

ionelmc opened this issue Jul 13, 2020 · 2 comments · Fixed by pytest-dev/pytest-xdist#558

Comments

@ionelmc
Copy link
Member

ionelmc commented Jul 13, 2020

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 ...

@blueyed
Copy link
Contributor

blueyed commented Jul 13, 2020

Looks related to #6981 (comment).

nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jul 13, 2020
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jul 13, 2020
@nicoddemus
Copy link
Member

Thanks @ionelmc,

Just to confirm, are you using pytest-xdist's option rsyncdirs?

If so this PR should fix it: pytest-dev/pytest-xdist#558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants