Closed jitseniesen closed 2 months ago
For that you can take a look at spyder/plugins/preferences/tests/conftest.py
. The config_dialog
fixture allows to test config pages in the Preferences dialog, as it's done in spyder/plugins/pylint/tests/test_pylint_config_dialog.py
, for instance.
There already is a test using the config_dialog
fixture, but that did not catch this particular error. The reason for this seems to be that the code behaves differently when run in a test because of https://github.com/spyder-ide/spyder/blob/5d9b4dadb27ffc3e0ace7a45e885e1d0b74927da/spyder/api/plugin_registration/registry.py#L390:
if plugin_name == Plugins.Preferences and not running_under_pytest():
Write a test which would have caught the embarrassing bug in #470. We do have one test which opens the notebook preferences page, but that did not catch the bug, so investigate.