Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a test to check that Spyder's preferences work #472

Open
jitseniesen opened this issue Sep 4, 2024 · 2 comments · May be fixed by #473
Open

Write a test to check that Spyder's preferences work #472

jitseniesen opened this issue Sep 4, 2024 · 2 comments · May be fixed by #473
Assignees
Milestone

Comments

@jitseniesen
Copy link
Member

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.

@jitseniesen jitseniesen added this to the v0.6.2 milestone Sep 4, 2024
@jitseniesen jitseniesen self-assigned this Sep 4, 2024
@ccordoba12
Copy link
Member

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.

@jitseniesen
Copy link
Member Author

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():

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants