I am trying to use pytest
within VS code, running in red hat linux. The environment that I am using means that I need to load modules such as pandas before running pytest
. In the terminal I can run:
module load pandas
pytest
and the tests are successfully run. I can do this in both the standard terminal, in the Python Debug Console within VS code, and int he bash terminal within VS code. If, however, I press the "Run All Tests" button within VS code, then I just get an error telling me that it cannot find the pandas module.
How can I tell the test environment to run my module load pandas
command before running pytest?