Skip to content

Commit 4f10a99

Browse files
authored
test:skip ubuntu py39 pyqt (#574)
1 parent eff4e27 commit 4f10a99

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/test_docs.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,18 @@ def test_doc_code_cells(fname):
3333
exec(cell, globalns)
3434

3535

36-
@pytest.mark.parametrize(
37-
"fname", [f for f in glob("examples/*.py") if "napari" not in f]
38-
)
36+
example_files = [f for f in glob("examples/*.py") if "napari" not in f]
37+
38+
# if os is Linux and python version is 3.9 and backend is PyQt5
39+
LINUX = sys.platform.startswith("linux")
40+
PY39 = sys.version_info >= (3, 9)
41+
PYQT5 = "PyQt5" in sys.modules
42+
if LINUX and PY39 and PYQT5:
43+
# skip range_slider example because of superqt c++ wrapped item bug
44+
example_files = [f for f in example_files if "range_slider" not in f]
45+
46+
47+
@pytest.mark.parametrize("fname", example_files)
3948
def test_examples(fname, monkeypatch):
4049
"""Make sure that all code cells in documentation perform as expected."""
4150
if "values_dialog" in str(fname):

0 commit comments

Comments
 (0)