- Add test_frosted_glass_disabled (basic test) - Add test_frosted_glass_enabled (mock-based test) Task: Phase 3, Task 1-2 complete
27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
import pytest
|
|
from unittest.mock import patch, MagicMock
|
|
from src.gui_2 import App
|
|
|
|
|
|
def test_frosted_glass_disabled():
|
|
with patch("src.gui_2.imgui") as mock_imgui:
|
|
with patch("src.gui_2.gl") as mock_gl:
|
|
app = App()
|
|
app.ui_frosted_glass_enabled = False
|
|
app._render_frosted_background((0, 0), (100, 100))
|
|
assert app._blur_pipeline is None
|
|
mock_gl.glEnable.assert_not_called()
|
|
mock_gl.glBlendFunc.assert_not_called()
|
|
mock_gl.glBindTexture.assert_not_called()
|
|
mock_gl.glBegin.assert_not_called()
|
|
mock_gl.glEnd.assert_not_called()
|
|
mock_gl.glDisable.assert_not_called()
|
|
mock_imgui.get_io().display_size.assert_not_called()
|
|
mock_imgui.get_io().display_framebuffer_scale.assert_not_called()
|
|
mock_imgui.get_window_draw_list.assert_not_called()
|
|
mock_imgui.get_window_pos.assert_not_called()
|
|
mock_imgui.get_window_size.assert_not_called()
|
|
mock_imgui.get_color_u32.assert_not_called()
|
|
mock_imgui.push_texture_id.assert_not_called()
|
|
mock_imgui.pop_texture_id.assert_not_called()
|