Affected Component
Schemas / Libs (libs/)
Bug Description
The unit test test_redis_url in tests/test_settings.py instantiates the Settings class without overriding environment variables. If a local .env file exists in the repository root containing custom variables (such as a modified REDIS_URL), Pydantic reads it, causing default setting verification tests to fail.
Steps to Reproduce
- Add
REDIS_URL=redis://localhost:6379/0 to your local .env file.
- Run settings tests:
python -m pytest tests/test_settings.py -k TestDefaults -v
Expected Behavior
The settings unit tests should isolate default values testing so that local config files (.env) do not override the expected default assertions.
Actual Behavior
When a local .env file exists with customized settings (such as REDIS_URL=redis://localhost:6379/0), test_redis_url fails:
AssertionError: assert 'redis://localhost:6379/0' == 'redis://localhost:6379'
Python Version
3.11
Operating System
Windows 11
Inference Device
None
Error Log / Traceback
Screenshots or Recordings
No response
Additional Context
No response
Checklist
Affected Component
Schemas / Libs (libs/)
Bug Description
The unit test
test_redis_urlintests/test_settings.pyinstantiates theSettingsclass without overriding environment variables. If a local.envfile exists in the repository root containing custom variables (such as a modifiedREDIS_URL), Pydantic reads it, causing default setting verification tests to fail.Steps to Reproduce
REDIS_URL=redis://localhost:6379/0to your local.envfile.Expected Behavior
The settings unit tests should isolate default values testing so that local config files (.env) do not override the expected default assertions.
Actual Behavior
When a local
.envfile exists with customized settings (such asREDIS_URL=redis://localhost:6379/0),test_redis_urlfails:AssertionError: assert 'redis://localhost:6379/0' == 'redis://localhost:6379'
Python Version
3.11
Operating System
Windows 11
Inference Device
None
Error Log / Traceback
Screenshots or Recordings
No response
Additional Context
No response
Checklist
mainbranch.