Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 638f971

Browse files
committed
ci: try cleaning up viewbox for failing windows tests
1 parent 56578f7 commit 638f971

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import time
44

55
from PyQt6 import QtCore
6+
from pyqtgraph.graphicsItems import ViewBox
7+
68
import pytest
79

810
from dcscope.gui.main import DCscope
@@ -16,6 +18,10 @@
1618

1719
@pytest.fixture
1820
def mw():
21+
# workaround: clear all viewboy items to avoid
22+
# "RuntimeError: wrapped C/C++ object of type ViewBox has been deleted"
23+
ViewBox.ViewBox.NamedViews.clear()
24+
ViewBox.ViewBox.AllViews.clear()
1925
mw = DCscope()
2026
yield mw
2127
mw.close()

0 commit comments

Comments
 (0)