Skip to content

Commit

Permalink
Merge pull request #473 from jitseniesen/test-config
Browse files Browse the repository at this point in the history
PR: Check that Plugins config page works with notebook plugin
  • Loading branch information
jitseniesen authored Sep 24, 2024
2 parents bcc101b + 7c3a79f commit 1fb61e2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spyder_notebook/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from qtpy.QtWidgets import QMainWindow

# Local imports
from spyder.api.plugin_registration._confpage import PluginsConfigPage
from spyder.api.plugin_registration.registry import PLUGIN_REGISTRY
from spyder_notebook.notebookplugin import NotebookPlugin


Expand All @@ -30,6 +32,15 @@ def __getattr__(self, attr):
[[MainWindowMock, [], [NotebookPlugin]]],
indirect=True)
def test_config_dialog(config_dialog):
# Check that Notebook config page works
configpage = config_dialog.get_page()
assert configpage
configpage.save_to_conf()

# Check that Plugins config page works with notebook plugin
# Regression test for spyder-ide/spyder-notebook#470
PLUGIN_REGISTRY.set_all_internal_plugins(
{NotebookPlugin.NAME: (NotebookPlugin.NAME, NotebookPlugin)}
)
plugins_config_page = PluginsConfigPage(PLUGIN_REGISTRY, config_dialog)
plugins_config_page.initialize()

0 comments on commit 1fb61e2

Please sign in to comment.