Skip to content

Commit

Permalink
Merge branch 'master' into save-load-args
Browse files Browse the repository at this point in the history
  • Loading branch information
jitseniesen committed Nov 7, 2023
2 parents 30ca90b + ac9ee16 commit f97ca71
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 27 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,11 @@ jobs:
fail-fast: false
matrix:
OS: ['ubuntu', 'macos', 'windows']
PYTHON_VERSION: ['3.8', '3.9', '3.10']
SPYDER_SOURCE: ['conda', 'git']
exclude:
- OS: 'macos'
PYTHON_VERSION: '3.8'
SPYDER_SOURCE: 'git'
- OS: 'macos'
PYTHON_VERSION: '3.9'
SPYDER_SOURCE: 'git'
- OS: 'windows'
PYTHON_VERSION: '3.8'
SPYDER_SOURCE: 'git'
- OS: 'windows'
PYTHON_VERSION: '3.9'
SPYDER_SOURCE: 'git'
PYTHON_VERSION: ['3.9', '3.10', '3.11']
# Do not test against conda for the moment because latest Spyder
# version on conda-forge is 6.0.0alpha2 which is not compatible
# with Spyder's master branch
SPYDER_SOURCE: ['git']
name: ${{ matrix.OS }} py${{ matrix.PYTHON_VERSION }} spyder-from-${{ matrix.SPYDER_SOURCE }}
runs-on: ${{ matrix.OS }}-latest
env:
Expand Down
6 changes: 4 additions & 2 deletions spyder_unittest/unittestplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def get_name():
"""
return _('Unit testing')

def get_description(self):
@staticmethod
def get_description():
"""
Return the plugin localized description.
Expand All @@ -85,7 +86,8 @@ def get_description(self):
"""
return _('Run test suites and view their results')

def get_icon(self):
@classmethod
def get_icon(cls):
"""
Return the plugin associated icon.
Expand Down
3 changes: 2 additions & 1 deletion spyder_unittest/widgets/confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ class UnitTestConfigPage(PluginConfigPage):

def setup_page(self) -> None:
settings_group = QGroupBox(_('Settings'))
self.abbrev_box = self.create_checkbox(
widget = self.create_checkbox(
_('Abbreviate test names'), 'abbrev_test_names', default=False)
self.abbrev_box = widget.checkbox

settings_layout = QVBoxLayout()
settings_layout.addWidget(self.abbrev_box)
Expand Down
10 changes: 1 addition & 9 deletions spyder_unittest/widgets/tests/test_confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ def get_plugin(self, plugin_name, error=True):
if plugin_name in PLUGIN_REGISTRY:
return PLUGIN_REGISTRY.get_plugin(plugin_name)

def set_prefs_size(self, size):
pass


class ConfigDialogTester(QWidget):
def __init__(self, parent, main_class,
Expand All @@ -83,9 +80,6 @@ def __init__(self, parent, main_class,
if self._main is None:
self._main = MainWindowMock(self)

def set_prefs_size(self, size):
pass

def register_plugin(self, plugin_name, external=False):
plugin = PLUGIN_REGISTRY.get_plugin(plugin_name)
plugin._register()
Expand All @@ -101,8 +95,6 @@ def get_plugin(self, plugin_name, error=True):
# types.MethodType(register_plugin, self._main))
setattr(self._main, 'get_plugin',
types.MethodType(get_plugin, self._main))
setattr(self._main, 'set_prefs_size',
types.MethodType(set_prefs_size, self._main))

PLUGIN_REGISTRY.reset()
PLUGIN_REGISTRY.sig_plugin_ready.connect(self._main.register_plugin)
Expand Down Expand Up @@ -135,7 +127,7 @@ def config_dialog(qtbot, request):
qtbot.addWidget(main_ref)

preferences = main_ref._main.get_plugin(Plugins.Preferences)
preferences.open_dialog(None)
preferences.open_dialog()
container = preferences.get_container()
dlg = container.dialog

Expand Down

0 comments on commit f97ca71

Please sign in to comment.