Is there a way to check in a python unit test (or any other script) if it is executed inside the PyCharm IDE or not?
I would like to do some special things in a unit test when it started locally, things I would not like to do when the whole thing is execute on the build server.
Cheers
When running under PyCharm, the PYCHARM_HOSTED
environment variable is defined.
isRunningInPyCharm = "PYCHARM_HOSTED" in os.environ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With