MCPcopy
hub / github.com/mne-tools/mne-python / pg_backend

Function pg_backend

mne/conftest.py:598–613  ·  view source on GitHub ↗

Use for pyqtgraph-specific test-functions.

(request, garbage_collect)

Source from the content-addressed store, hash-verified

596
597@pytest.fixture
598def pg_backend(request, garbage_collect):
599 """Use for pyqtgraph-specific test-functions."""
600 _check_pyqtgraph(request)
601 from mne_qt_browser._pg_figure import MNEQtBrowser
602
603 with use_browser_backend("qt") as backend:
604 backend._close_all()
605 yield backend
606 backend._close_all()
607 # This shouldn't be necessary, but let's make sure nothing is stale
608 import mne_qt_browser
609
610 mne_qt_browser._browser_instances.clear()
611 if not _test_passed(request):
612 return
613 _assert_no_instances(MNEQtBrowser, f"Closure of {request.node.name}")
614
615
616@pytest.fixture(

Callers

nothing calls this directly

Calls 5

use_browser_backendFunction · 0.90
_assert_no_instancesFunction · 0.90
_check_pyqtgraphFunction · 0.85
_test_passedFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected