PyCharm
 
Get PyCharm

Testing frameworks

Last modified: 08 October 2024

PyCharm enables usage of the following testing frameworks:

Before you start working with the testing framework of your choice, make sure that the desired framework is installed on your machine. For more information about installation details, refer to the framework documentation.

PyCharm auto-detects a test runner that is installed on your Python interpreter and uses it to run tests. Still, you always have an option to explicitly specify the required test runner in the project settings.

By default, the suggested default test runner is unittest. However, you can redefine the default framework and change it to nosetest, pytest or TwistedTrial.

With the test runner selected, PyCharm suggests the appropriate default run/debug configuration:

Suggested run/debug configuration for a test framework

If a user already has the testing run/debug configuration for a specific file and for a specific testing framework, then PyCharm will launch this run/debug configuration, regardless of your chosen default test runner. For more information in how to change or delete such a configuration, refer to Run/debug configurations.