I am trying to run python tests via pytest on a Windows machine. There is a shell script in this repository which contains a line of input to do so:
env $(cat ../env.example | xargs) pytest $@
As I understand it, this retrieves environment variables from env.example (located in the parent directory from where the tests live), builds them into an argument package xargs
, and passes the arguments with the pytest
command to the tests script.
This does not work on Windows, obviously. Namely because env and xargs are not native. I know that set
works similarly to env
. Aside from that, what would be the equivalent input to run these tests with the desired environment variables on my machine?