ashald / EnvFile

EnvFile 3.x is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.
MIT License
533 stars 125 forks source link

in pycharm, envfiles not loaded when running tests #202

Open trondhindenes opened 1 year ago

trondhindenes commented 1 year ago

Hi, In pycharm 2022.2, envfile works as expected when running/debugging. However, when executing a test wiht pycharm's pytest runner it does not - no environment variables are loaded.

panicoenlaxbox commented 1 year ago

Idem here PyCharm 2022.2.4 (Community Edition)

acurvers commented 1 year ago

idem here Intellij 2022.2.4 (Ultimate edition)

alphavector commented 1 year ago

+ PyCharm 2022.3 (Professional Edition)

koliber commented 1 year ago

I have the same issue. PyCharm 2022.3 Professional. The documentation mentions something about items in italic working only in the paid version. The Django and Django test run targets are in italic. However, I could not find anything about how to buy the paid version of the plugin. @ashald I'd consider buying, but please share more instructions about that.

i-zhivetiev commented 1 year ago

The same issue. PyCharm 2022.2.3 (Professional Edition).

jlpoveda-jt commented 1 year ago

Same here. PyCharm 2022.3.1 (Professional Edition).

AndrewShakinovsky-SAS commented 1 year ago

+ Intellij 2022.1.4

zack-kimble commented 1 year ago

Same issue, PyCharm 2022.3.3 (Professional Edition), but only when using "autodetect" for Python test configurations. Explicitly setting a test runner in Settings>Tools>Python Integrated Tools fixes the problem for me.

martinzarza commented 1 year ago

Same issue, PyCharm 2022.3.3 (Professional Edition), but only when using "autodetect" for Python test configurations. Explicitly setting a test runner in Settings>Tools>Python Integrated Tools fixes the problem for me.

This solved the issue for me. Thanks!

martimors commented 9 months ago

Facing this. Does anyone know of a maintained alternative to this plugin? I wish pycharm could support this basic functionality that VSCode has had basically since it launched.

kjyv commented 3 months ago

It seems specifying the .env file again in the Paths to ".env" files field for the autodetect template also helps. Still, would be nice if this could be fixed properly in EnvFile