Coverage for src / local_deep_research / settings / env_definitions / testing.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.12.0, created at 2026-01-11 00:51 +0000

1""" 

2Testing and CI environment settings. 

3 

4These settings control test mode behavior and CI/testing flags. 

5""" 

6 

7import os 

8from ..env_settings import BooleanSetting 

9 

10 

11# External environment variables (not LDR-prefixed, set by external systems) 

12# These are read directly since we don't control them 

13CI = os.environ.get("CI", "false").lower() in ("true", "1", "yes") 

14GITHUB_ACTIONS = os.environ.get("GITHUB_ACTIONS", "false").lower() in ( 

15 "true", 

16 "1", 

17 "yes", 

18) 

19TESTING = os.environ.get("TESTING", "false").lower() in ("true", "1", "yes") 

20 

21 

22# LDR Testing settings (our application's test configuration) 

23TESTING_SETTINGS = [ 

24 BooleanSetting( 

25 key="testing.test_mode", 

26 description="Enable test mode (adds delays for testing concurrency)", 

27 default=False, 

28 ), 

29 BooleanSetting( 

30 key="testing.use_fallback_llm", 

31 description="Use mock LLM for testing (skips API calls and DB operations)", 

32 default=False, 

33 ), 

34]