feat: add get_default_config_path function
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,12 @@ import tempfile
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
from zzpyjenkins.config import load_config, ConfigError, get_server_config
|
||||
from zzpyjenkins.config import (
|
||||
load_config,
|
||||
ConfigError,
|
||||
get_server_config,
|
||||
get_default_config_path,
|
||||
)
|
||||
|
||||
|
||||
def test_load_config_file_not_found():
|
||||
@@ -68,3 +73,11 @@ def test_get_server_config_missing_field():
|
||||
with pytest.raises(ConfigError) as exc_info:
|
||||
get_server_config(config, "incomplete")
|
||||
assert "password" in str(exc_info.value)
|
||||
|
||||
|
||||
def test_get_default_config_path():
|
||||
"""Test default config path is correct."""
|
||||
path = get_default_config_path()
|
||||
assert path.name == "config.toml"
|
||||
assert ".config" in str(path)
|
||||
assert "zzpyjenkins" in str(path)
|
||||
|
||||
Reference in New Issue
Block a user