fix(merge): resolve develop merge conflict leftovers

Remove duplicate load_config stub that was injected into
_resolve_config_file's docstring in config.py (SyntaxError
on import). Add workers attribute to 3 TestCLIHistoryResolution
mocks — develop added workers resolution in cli.py but the
existing tests didn't mock it, causing TypeError.
This commit is contained in:
AlexKucera committed 2026-06-04 11:10:32 +02:00
1 parent 44fc544a3e
commit c4ee24bb28
2 files changed
+3 -6

No files matched your search

-6
View File
@@ -43,12 +43,6 @@ class InvalidWorkersError(ConfigError):
def _resolve_config_file(filename: str) -> Path | None:
"""Resolve a config file by searching XDG then CWD.
def load_config(config_path: Path | str, secrets_path: Path | str) -> Config:
"""Load config.yaml + secrets.yaml, merge, validate, and return Config."""
config_path = Path(config_path)
secrets_path = Path(secrets_path)
Searches ``~/.config/librofm-downloader/`` first, then falls back to
the current working directory. Auto-creates the XDG parent directory
on demand.
+3
View File
@@ -676,6 +676,7 @@ class TestCLIHistoryResolution:
mock_config.return_value.password = "secret"
mock_config.return_value._config_path = None
mock_config.return_value.output_dir = "./audiobooks"
mock_config.return_value.workers = 3
mock_instance = mock_client_cls.return_value
mock_instance.authenticate.return_value = "tok"
@@ -711,6 +712,7 @@ class TestCLIHistoryResolution:
mock_config.return_value.password = "secret"
mock_config.return_value._config_path = None
mock_config.return_value.output_dir = "./audiobooks"
mock_config.return_value.workers = 3
mock_instance = mock_client_cls.return_value
mock_instance.authenticate.return_value = "tok"
@@ -737,6 +739,7 @@ class TestCLIHistoryResolution:
mock_config.return_value.password = "secret"
mock_config.return_value._config_path = None
mock_config.return_value.output_dir = "./audiobooks"
mock_config.return_value.workers = 3
mock_instance = mock_client_cls.return_value
mock_instance.authenticate.return_value = "tok"