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

Problem with pytest-xdist and cache #37

Open
sobolevn opened this issue Sep 5, 2020 · 0 comments
Open

Problem with pytest-xdist and cache #37

sobolevn opened this issue Sep 5, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@sobolevn
Copy link
Member

sobolevn commented Sep 5, 2020

Sometimes, when we have both cache and xdist, this might happen:

[gw1] linux -- Python 3.8.5 /home/runner/work/returns/returns/.venv/bin/python
Traceback (most recent call last):
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/_pytest/runner.py", line 294, in from_call
    result = func()  # type: Optional[_T]
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/_pytest/runner.py", line 247, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/_pytest/runner.py", line 161, in pytest_runtest_call
    raise e
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/_pytest/runner.py", line 153, in pytest_runtest_call
    item.runtest()
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pytest_mypy_plugins/item.py", line 262, in runtest
    dependants = self.find_dependent_paths(path)
  File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/pytest_mypy_plugins/item.py", line 165, in find_dependent_paths
    if f'"{py_module}"' in path.read_text():
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/pathlib.py", line 1232, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/pathlib.py", line 1218, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/pathlib.py", line 1074, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.mypy_cache/3.8/@plugins_snapshot.json.484c4696e62da2ed'

Build: https://github.com/dry-python/returns/pull/581/checks?check_run_id=1075226140#step:7:557

@sobolevn sobolevn added the bug Something isn't working label Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant