pytest-xdist crashes with pytest-cov error
Asked Answered
H

1

7

I was trying to execute tests for my package over remote machine through ssh from my master node. Both nodes have same version of the packages installed.

I'm running test like this,

pytest -d --tx ssh=ubuntu//python=python3  --rsyncdir /home/ubuntu/pkg/ /home/ubuntu/pkg -n 7

on running this, I'm getting following error,

------------------------------ coverage ------------------------------
---------------------- coverage: failed workers ----------------------
The following workers failed to return coverage data, ensure that pytest-cov is installed on these workers.
gw0
gw1
gw2
gw3
gw4
gw5
gw6
Coverage XML written to file coverage.xml

I've made sure that coverage is installed in the worker node.

coverage==6.2
pytest-cov==3.0.0

I don't know why it is still failing.

I also noticed that the code files have not been synced in the worker machine for some reason.

I'm trying to understand what is going wrong here and how to fix this.

Harhay answered 1/2, 2022 at 13:24 Comment(0)
N
0

This error was popping up for me because of an issue that was unrelated to pytest, pytest-cov or pytest-xdist - some of my python imports were wrong.

Fixing up other code issues first might be worth a shot.

Netsuke answered 15/1 at 23:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.