Skip to content
Advertisement

pytest is not running conftest.py to pick up custom command args

In a project im working on we have a step where we export a csv before exporting we run a regression test step against the report using pytest. pytest is invoked using the following command

JavaScript

–sample and –expectations are custom args defined in the conftest.py using the following

JavaScript

when calling this code locally it works pytest finds the conf but when inside a docker container it doesnt pick up the conftest and therefore fails on running pytest. a simplified folder layout is as follows

JavaScript

any help would be greatly appreciated, thanks

Advertisement

Answer

the issue was fixed by moving conftest into the src folder allowed pytest to find it

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement