I have mine set up so that I can run python tests by right-clicking. I do have to compile from the command line first, though – it’s possible to add a gradle task to be done before the python test, but that wastes many seconds.
- Ensure that your Python interpreter is set up correctly.
cmd ; > modulescan bring up the module menu.
- From the top menu, go to
Run > Edit Configurations
- From the left menu, navitage to
Defaults > Python tests > Unittests
- edit your default to look like this, and hit save:
The environment variable hidden for me is
We need this to add py4j and pyspark to the python path.