feat(config): Implement parsing for shader and window frame configurations
This commit is contained in:
23
tests/test_shader_config.py
Normal file
23
tests/test_shader_config.py
Normal 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
|
||||
Reference in New Issue
Block a user