Spaces:
Paused
Paused
File size: 839 Bytes
e40dce0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | from importlib.machinery import SourceFileLoader
from pathlib import Path
PROJECT_DIR = Path(__file__).resolve().parents[1]
SETTINGS_PATH = PROJECT_DIR / 'settings.py'
def load_settings():
mod = SourceFileLoader('ibe_pp_settings', str(SETTINGS_PATH)).load_module()
return mod
def test_session_configs_present_and_paths_exist():
settings = load_settings()
cfgs = {c['name']: c for c in settings.SESSION_CONFIGS}
for name in ['classic_baseline', 'policy_nudges', 'guessing_game_demo', 'survey_biases_full']:
assert name in cfgs
# Check app folders exist for policy_nudges sequence
apps = cfgs['policy_nudges']['app_sequence']
for app in apps:
if app in ('payment_info',):
continue
path = PROJECT_DIR / app
assert path.exists(), f"App folder missing: {path}"
|