import pytest
from unittest.mock import patch, MagicMock

def test_shader_live_editor_renders():
 from src.gui_2 import App
 app = App()
 app.show_windows["Shader Editor"] = True
 
 with patch("src.gui_2.imgui") as mock_imgui:
  mock_imgui.begin.return_value = (True, True)
  mock_imgui.slider_float.return_value = (False, 1.0)
  app._render_shader_live_editor()
  assert mock_imgui.begin.called
  assert mock_imgui.end.called
