I have "src/bin" folder to store the code and "tests" folder to store my test scripts. I am using the below pytest command in my pipeline

pytest /builds/cdf/Platform/onprem-core-functions/test/ --cov=src --cov-report xml:coverage/cov.xml --cov-branch 

but it fails with the below error.

CoverageWarning: No data was collected. (no-data-collected)

Also please note that if I keep my test script in the home directory instead of "test" folder, then the below pytest command runs successfully.

pytest --cov=src --cov-report xml:coverage/cov.xml --cov-branch 

However, in order to keep all my test scripts outside my application code, I intend to move them into a separate "test" folder instead of cluttering the home directory. Can you please advise where am i going wrong.

0

There are 0 best solutions below