I’ve been running my tests using pytest directly, ...
# general
l
I’ve been running my tests using pytest directly, I just tried to run via
pants test
but for some reason it’s not loading my
python-dotenv pydantic
settings.
Copy code
settings = MyTestConfig()
  File "/root/.cache/pants/named_caches/pex_root/venvs/s/42a9f502/venv/lib/python3.9/site-packages/pydantic/env_settings.py", line 39, in __init__
    super().__init__(
  File "/root/.cache/pants/named_caches/pex_root/venvs/s/42a9f502/venv/lib/python3.9/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
1
h
Is your env file making it into the test sandbox?
l
oh, that makes sense, I need to require those files. Let me try that
That obviously did it for me, thanks @high-yak-85899
🙌 1