I'm using Python 3.8 and pytest. I have this pytest.ini file ...
[pytest]
env_override_existing_values = 1
env_files =
tests/.test_env
My tests/.test_env contains
TZ=`ls -la /etc/localtime | cut -d/ -f8-9`
However, this is getting literally evaluated in my pytest -- that is TZ is being equal to "ls -la /etc/localtime | cut -d/ -f8-9". Is there a way I can configure my env var for pytest to be the result of an expression when I run "pytest tests/my_test.py"? FYI, it is not an option to do something like "TZ=ls -la /etc/localtime | cut -d/ -f8-9
; pytest tests/my_test.py"