| Type | Click one of the radio-buttons to define the testing scope (all tests in a folder, all tests in a script,
a test class, a single test method or function.) |
|
Inspect only subclasses of unittest.TestCase | If this check box is selected (default option), the test runner behaves as the regular unittest .
If this check box is not selected, PyCharm looks for the test functions in all possible locations for the specified test type.
|
| Tests | Specify the location of the tests. The fields in this section are enabled depending on the test type selected in the Type section.
- All tests in folder: for this testing scope, specify the following parameters:
Folder: type the path to the directory that contains the tests to be executed, or click the browse button and select the desired directory in the
dialog that opens.
Pattern: type the one or more patterns the file names should match for the files to be considered tests.
It is important that the names are case-sensitive.
Use comma as the delimiter. The patterns should be Python regular expressions.
Note that by default, the names of the test files start with "test".
If the option All tests in folder has been selected, only files matching the pattern are processed.
Define your own pattern to override the default.
- Tests in script: for this scope, specify the name of the script that contains the tests to be executed.
- Tests class: for this scope, specify the name of the script and test class.
- Tests method: for this scope, specify the name of the script, test class and test method.
- Tests function: for this scope, specify the name of the script, and test method.
|
| Environment variable | Click the browse button, or press Shift+Enter to specify the desired set of
environment variables in the Environment Variables dialog box. To create a new variable, click ,
and type the desired name and value.
|
| Python Interpreter | Select one of the pre-configured Python interpreters from the drop-down list. |
| Interpreter options | In this field, specify the string to be passed to the interpreter. If necessary,
click , and type the string in the editor. |
| Working directory | Specify a directory to be used by the running task.
- When a default run/debug configuration is created by the keyboard shortcut Ctrl+Shift+F10,
or by choosing on the context menu of a script, the working directory is
the one that contains the executable script. This directory may differ from the project directory.
- When this field is left blank, the bin directory of the PyCharm installation will be used.
|