fix: resolve CI linting and type checking issues
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
21
app/tests/test_config.py
Normal file
21
app/tests/test_config.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import pytest
|
||||||
|
from cmdparse.config import find_config_file, load_config, get_builtin_config_path
|
||||||
|
|
||||||
|
|
||||||
|
def test_find_config_file_nonexistent():
|
||||||
|
"""Test finding config file when none exists."""
|
||||||
|
result = find_config_file('/nonexistent/path.yaml')
|
||||||
|
assert result is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_load_config_nonexistent():
|
||||||
|
"""Test loading config when file doesn't exist."""
|
||||||
|
result = load_config('/nonexistent/path.yaml')
|
||||||
|
assert result == {'parsers': []}
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_builtin_config_path():
|
||||||
|
"""Test getting built-in config path."""
|
||||||
|
path = get_builtin_config_path()
|
||||||
|
assert 'config' in str(path)
|
||||||
|
assert 'default_parsers.yaml' in str(path)
|
||||||
Reference in New Issue
Block a user