Coverage for tests/test_toml_config.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-13 17:03 +0200

1from contextlib import chdir 

2 

3from src.edwh.tasks import TomlConfig 

4 

5 

6def test_toml_config_bootstrap_preserves_application_context(tmp_path): 

7 """Loading a fallback config must not lose ewok's application context.""" 

8 (tmp_path / "docker-compose.yml").write_text("services: {}\n") 

9 (tmp_path / "default.toml").write_text( 

10 """[services] 

11services = [] 

12minimal = [] 

13include_celeries_in_minimal = false 

14include_pgq_in_minimal = false 

15log = [] 

16db = [] 

17""" 

18 ) 

19 

20 with chdir(tmp_path): 

21 config = TomlConfig.load(cache=False) 

22 

23 assert config is not None 

24 assert (tmp_path / ".toml").exists()