feat(conductor): Implement configurable paths and mark track 'Conductor Path Configuration' as complete
This commit is contained in:
@@ -9,21 +9,19 @@ def temp_logs(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Generator[Path
|
||||
# Ensure closed before starting
|
||||
session_logger.close_session()
|
||||
monkeypatch.setattr(session_logger, "_comms_fh", None)
|
||||
# Mock _LOG_DIR in session_logger
|
||||
original_log_dir = session_logger._LOG_DIR
|
||||
session_logger._LOG_DIR = tmp_path / "logs"
|
||||
monkeypatch.setattr(session_logger, "_LOG_DIR", tmp_path / "logs")
|
||||
session_logger._LOG_DIR.mkdir(parents=True, exist_ok=True)
|
||||
# Mock _SCRIPTS_DIR
|
||||
original_scripts_dir = session_logger._SCRIPTS_DIR
|
||||
session_logger._SCRIPTS_DIR = tmp_path / "scripts" / "generated"
|
||||
monkeypatch.setattr(session_logger, "_SCRIPTS_DIR", tmp_path / "scripts" / "generated")
|
||||
session_logger._SCRIPTS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
yield tmp_path / "logs"
|
||||
|
||||
log_dir = tmp_path / "logs"
|
||||
scripts_dir = tmp_path / "scripts" / "generated"
|
||||
log_dir.mkdir(parents=True, exist_ok=True)
|
||||
scripts_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
from src import paths
|
||||
monkeypatch.setattr(paths, "get_logs_dir", lambda: log_dir)
|
||||
monkeypatch.setattr(paths, "get_scripts_dir", lambda: scripts_dir)
|
||||
|
||||
yield log_dir
|
||||
# Cleanup: Close handles if open
|
||||
session_logger.close_session()
|
||||
session_logger._LOG_DIR = original_log_dir
|
||||
session_logger._SCRIPTS_DIR = original_scripts_dir
|
||||
|
||||
def test_open_session_creates_subdir_and_registry(temp_logs: Path) -> None:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user