1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-12-30 18:51:19 +01:00

test: fix tests for qtheme v1

This commit is contained in:
2025-08-26 10:26:54 +02:00
committed by wyzula-jan
parent b1d2100e05
commit 1adabb0955
4 changed files with 9 additions and 13 deletions

View File

@@ -13,15 +13,15 @@ classifiers = [
"Topic :: Scientific/Engineering",
]
dependencies = [
"bec_ipython_client~=3.52", # needed for jupyter console
"bec_ipython_client~=3.52", # needed for jupyter console
"bec_lib~=3.52",
"bec_qthemes~=1.0",
"black~=25.0", # needed for bw-generate-cli
"isort~=5.13, >=5.13.2", # needed for bw-generate-cli
"bec_qthemes~=1.0, >=1.1.1",
"black~=25.0", # needed for bw-generate-cli
"isort~=5.13, >=5.13.2", # needed for bw-generate-cli
"pydantic~=2.0",
"pyqtgraph~=0.13",
"PySide6==6.9.0",
"qtconsole~=5.5, >=5.5.1", # needed for jupyter console
"qtconsole~=5.5, >=5.5.1", # needed for jupyter console
"qtpy~=2.4",
"qtmonaco~=0.5",
"thefuzz~=0.22",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -64,10 +64,10 @@ def test_dark_mode_button_changes_theme(dark_mode_button):
Test that the dark mode button changes the theme correctly.
"""
with mock.patch(
"bec_widgets.widgets.utility.visual.dark_mode_button.dark_mode_button.set_theme"
) as mocked_set_theme:
"bec_widgets.widgets.utility.visual.dark_mode_button.dark_mode_button.apply_theme"
) as mocked_apply_theme:
dark_mode_button.toggle_dark_mode()
mocked_set_theme.assert_called_with("dark")
mocked_apply_theme.assert_called_with("dark")
dark_mode_button.toggle_dark_mode()
mocked_set_theme.assert_called_with("light")
mocked_apply_theme.assert_called_with("light")

View File

@@ -17,10 +17,6 @@ def stop_button(qtbot, mocked_client):
def test_stop_button(stop_button):
assert stop_button.button.text() == "Stop"
assert (
stop_button.button.styleSheet()
== "background-color: #cc181e; color: white; font-weight: bold; font-size: 12px;"
)
stop_button.button.click()
assert stop_button.queue.request_scan_halt.called
stop_button.close()