kvas-it / pytest-console-scripts

Pytest plugin for testing console scripts
MIT License
78 stars 14 forks source link

Add support for passing environment variables to the script under test #3

Closed kvas-it closed 6 years ago

kvas-it commented 7 years ago

It's already possible to do it via simply modifying os.environ before running the script and then restoring it but it would be nice if script_runner.run(...) had a parameter for that. Actually run_subprocess already does: env argument will be just passed to subprocess.Popen so we just need to implement it for run_inprocess.

a96tudor commented 6 years ago

I'm on it