feat(config): Implement parsing for shader and window frame configurations

This commit is contained in:
2026-03-13 12:41:24 -04:00
parent 830bd7b1fb
commit d69434e85f
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import pytest
from unittest.mock import patch
from src import theme
def test_shader_config_parsing():
config = {
"theme": {
"shader_crt": True,
"shader_bloom": False,
"shader_bg": "noise",
"custom_window_frame": True
}
}
with patch("src.theme.apply"), \
patch("src.theme.apply_font"), \
patch("src.theme.set_scale"):
theme.load_from_config(config)
assert theme.get_shader_config("crt") is True
assert theme.get_shader_config("bloom") is False
assert theme.get_shader_config("bg") == "noise"
assert theme.get_window_frame_config() is True