Skip to content

Commit

Permalink
Testing: Fix test_change_ui_theme_and_color_scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Jul 29, 2022
1 parent 3dc0acd commit 852fca2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spyder/plugins/appearance/tests/test_confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_change_ui_theme_and_color_scheme(config_dialog, mocker, qtbot):
widget.schemes_combobox.setCurrentIndex(names.index('pydev'))
dlg.apply_btn.clicked.emit()
assert SpyderConfigPage.prompt_restart_required.call_count == 1
assert CONF.disable_notifications.call_count == 1
assert CONF.disable_notifications.call_count == 2

# Change to the 'dark' ui theme
widget.ui_combobox.setCurrentIndex(2)
Expand All @@ -64,22 +64,22 @@ def test_change_ui_theme_and_color_scheme(config_dialog, mocker, qtbot):
widget.ui_combobox.setCurrentIndex(0)
dlg.apply_btn.clicked.emit()
assert SpyderConfigPage.prompt_restart_required.call_count == 2
assert CONF.disable_notifications.call_count == 2
assert CONF.disable_notifications.call_count == 4

# Change to the 'light' ui theme
widget.ui_combobox.setCurrentIndex(1)
dlg.apply_btn.clicked.emit()
assert SpyderConfigPage.prompt_restart_required.call_count == 3
assert CONF.disable_notifications.call_count == 3
assert CONF.disable_notifications.call_count == 6

# Change to another dark color scheme
widget.schemes_combobox.setCurrentIndex(names.index('solarized/dark'))
dlg.apply_btn.clicked.emit()
assert SpyderConfigPage.prompt_restart_required.call_count == 4
assert CONF.disable_notifications.call_count == 4
assert CONF.disable_notifications.call_count == 8

# Change to the 'automatic' ui theme again
widget.ui_combobox.setCurrentIndex(0)
dlg.apply_btn.clicked.emit()
assert SpyderConfigPage.prompt_restart_required.call_count == 4
assert CONF.disable_notifications.call_count == 4
assert CONF.disable_notifications.call_count == 8

0 comments on commit 852fca2

Please sign in to comment.