A common use case for any test framework users (my preferred is PyTest), is to run a test from the IDE (PyCharm in this case) and later have the ability to change the configuration of the run in the UI, per test.
Cursor has pytest support, but if you’re using multiple environments to run tests on, you’ll need more granularity. Having this option is better than just running pytest in the command line, because you end up not needing to think about configuring environments as you change between them, per test.
In PyCharm these are called Run Configurations and it would be accessible via the Play button near the test you just ran (which there isn’t any UI/functionality for in Cursor yet altogether - unless I need to configure something differently! If so please let me know). You can then specify the module and the test, modify arguments (as you can already do with Cursor globally for PyTest) and Environment variables all in one place, per test.
If this already exists somewhere and I couldn’t find it, please let me know!
pytest support in Cursor currently has some limitations compared to PyCharm’s Run Configurations feature. Let me explain the current state and available options:
Current Pytest Support in Cursor:
Basic pytest execution is supported through the command line
Global pytest arguments can be configured
Environment variables can be set workspace-wide
Available Configuration Options (from our workspace settings):