<#2835 feat: Load project `.env` for built-in test...
# meltano-repo-activity
g
#2835 feat: Load project
.env
for built-in tests
Pull request opened by ReubenFrankel In my VSCode config, I have
Copy code
"python.envFile": "",
to stop it auto-loading the contents of my project
.env
file into the environment. A drawback of doing this is that Pytest discovery fails for my SDK plugin projects with `ConfigValidationError`s until I manually export the
.env
or temporarily provide sensitive config in
tests/test_core.py
and hope I don't accidentally commit it. 😬 This change loads the project
.env
file before test discovery runs. I was only able to get in working in
tests/test_core.py
in the limited time that I had today (which means this would really only be beneficial for new SDK taps/targets), but let me know if it is possible somewhere that would mean I don't have to update all my plugin
tests/test_core.py
files manually (e.g. in
TapTestClassFactory.new_test_class
). --- 📚 Documentation preview 📚: https://meltano-sdk--2835.org.readthedocs.build/en/2835/ meltano/sdk