EnvFile icon indicating copy to clipboard operation
EnvFile copied to clipboard

in pycharm, envfiles not loaded when running tests

Open trondhindenes opened this issue 1 year ago • 11 comments

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.

trondhindenes avatar Nov 15 '22 22:11 trondhindenes

Idem here PyCharm 2022.2.4 (Community Edition)

panicoenlaxbox avatar Nov 25 '22 08:11 panicoenlaxbox

idem here Intellij 2022.2.4 (Ultimate edition)

acurvers avatar Nov 25 '22 12:11 acurvers

+ PyCharm 2022.3 (Professional Edition)

alphavector avatar Dec 27 '22 23:12 alphavector

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.

koliber avatar Jan 16 '23 21:01 koliber

The same issue. PyCharm 2022.2.3 (Professional Edition).

i-zhivetiev avatar Jan 18 '23 04:01 i-zhivetiev

Same here. PyCharm 2022.3.1 (Professional Edition).

jlpoveda-jt avatar Jan 25 '23 16:01 jlpoveda-jt

Intellij 2022.1.4

AndrewShakinovsky-SAS avatar Feb 28 '23 15:02 AndrewShakinovsky-SAS

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.

zack-kimble avatar Mar 23 '23 20:03 zack-kimble

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!

martinzarza avatar Apr 12 '23 18:04 martinzarza

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.

martimors avatar Sep 25 '23 12:09 martimors

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

kjyv avatar Apr 10 '24 12:04 kjyv