every pytest uses different configuration

I have multiple unittests, all running using pytest.

I was ALL the tests to run using an env-file. I do have EnvFile plugin. but when i right-click -> Run "pytest..."
The test is running using a new configuration, which doesn't include the envfile i have already configured using the EnvFile plugin.
See image, i have multiple configurations and I would like ALL of them to use the same EnvFile

Comment actions Permalink

>when i right-click -> Run "pytest..."
>The test is running using a new configuration

Do you right-click on the tests root dir, or on individual tests? PyCharm shouldn't create new configuration if you click on the same element.

It would help if you could provide detailed steps to reproduce the issue.

Comment actions Permalink

I do run-click on the individual test which I want to run. You can see in the image I posted, for 5 different individual tests I got 5 different configurations. I don't want to apply the same EnvFile config for every test I am running.

it's more of a question, not a bug, how can I apply env-file for every configuration by default?

Comment actions Permalink

Ah, I see. You can use templates for this.

How to use run/debug configuration templates: https://www.jetbrains.com/help/pycharm/run-debug-configuration.html#default


Please sign in to leave a comment.