Skip to content

Commit

Permalink
[Maint] Fix comprehensive tests by skipping labels controls test on p…
Browse files Browse the repository at this point in the history
…y311 pyqt6 (#5922)

# Fixes/Closes

Closes # #5921

# Description

In #5439 @Carreau identified a failing condition for the
qt_layer_controls test that a results in a fault on python 3.11 and
pyqt5 on ubuntu. However, in that PR, pyqt6 was not tested with python
311. The same test can be see to fail in comprehensive tests which do
run python 311 and pyqt6.
This PR adds pyqt6 to the check to skip the test.

# References

#5439 

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
  • Loading branch information
3 people committed Jun 21, 2023
1 parent 98897b1 commit ae79064
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions napari/_qt/layer_controls/_tests/test_qt_layer_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,14 @@ def test_create_layer_controls(
qcombobox.setCurrentIndex(qcombobox_initial_idx)


if sys.version_info[:2] == (3, 11) and qtpy.API == 'pyqt5':
if sys.version_info[:2] == (3, 11) and (
qtpy.API == 'pyqt5' or qtpy.API == 'pyqt6'
):
test_data = []
else:
# those 2 fail on 3.11 + pyqt5 with a segfault that can't be caught by
# those 2 fail on 3.11 + pyqt5 and pyqt6 with a segfault that can't be caught by
# pytest in qspinbox.setValue(value)
# See: https://github.com/napari/napari/pull/5439
test_data = [_LABELS_WITH_COLOR, _LABELS]


Expand Down

0 comments on commit ae79064

Please sign in to comment.