Executing scripts before tests

Hi,

I am new to pycharm and python in general. 

I have unit tests which rely on environment variables which needs to be set before the tests are run.

Is there a way to execute a script which sets these automatically for all configurations before they are run/debugged?

 

Thanks,

Rakesh

 

1 comment
Comment actions Permalink

Hi,

Yes, you can use run/debug configuration templates for that.

Please see the following page, the section about templates:

https://www.jetbrains.com/help/pycharm/run-debug-configuration-python-unit-test.html

0

Please sign in to leave a comment.