Iproved logging for startup flags.
This commit is contained in:
@@ -5,6 +5,8 @@ Tests the _validate_setting_value method to ensure proper input validation
|
||||
for all configurable settings that could cause crashes or accessibility issues.
|
||||
"""
|
||||
|
||||
from argparse import Namespace
|
||||
|
||||
import pytest
|
||||
import sys
|
||||
from pathlib import Path
|
||||
@@ -206,6 +208,30 @@ def test_focus_settings_define_tui_toggle():
|
||||
assert settings_data["focus"]["tui"] is False
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.settings
|
||||
def test_format_cli_args_reports_startup_flags_in_stable_order():
|
||||
manager = SettingsManager()
|
||||
cli_args = Namespace(
|
||||
debug=True,
|
||||
foreground=False,
|
||||
force_all_screens=False,
|
||||
ignore_screen=["7"],
|
||||
options="speech#rate=1.2",
|
||||
print=False,
|
||||
setting="/tmp/settings.conf",
|
||||
x11=True,
|
||||
x11_window_id="0x123",
|
||||
)
|
||||
|
||||
assert manager.format_cli_args(cli_args) == (
|
||||
"{'debug': True, 'force_all_screens': False, 'foreground': False, "
|
||||
"'ignore_screen': ['7'], 'options': 'speech#rate=1.2', "
|
||||
"'print': False, 'setting': '/tmp/settings.conf', 'x11': True, "
|
||||
"'x11_window_id': '0x123'}"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.settings
|
||||
class TestSettingsPathSelection:
|
||||
|
||||
Reference in New Issue
Block a user