Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/qt_viz_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ jobs:
if: runner.os == 'Linux'
- name: Show system information
run: mne sys_info
# This can go away if we make OpenGL opt-in in MNE and backport the change
# This line also does not work on macOS
- run: sed -i'' '/^ error::/a\ ignore:.*PyOpenGL was not found.*:RuntimeWarning' ../mne-python/mne/conftest.py
name: Adjust mne conftest
if: matrix.opengl == ''
- run: pytest -m pgtest --cov=mne_qt_browser --cov-report=xml ../mne-python/mne/viz
name: Run MNE-Tests
- run: pytest mne_qt_browser/tests
Expand Down
5 changes: 4 additions & 1 deletion mne_qt_browser/_pg_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from mne.annotations import _sync_onset
from mne.io.pick import (_DATA_CH_TYPES_ORDER_DEFAULT,
channel_indices_by_type, _DATA_CH_TYPES_SPLIT)
from mne.utils import logger, sizeof_fmt, warn
from mne.utils import logger, sizeof_fmt, warn, get_config

try:
from pytestqt.exceptions import capture_exceptions
Expand Down Expand Up @@ -2159,6 +2159,9 @@ def __init__(self, **kwargs):
self._add_scalebars()

# Check for OpenGL
if self.mne.use_opengl is None: # default: opt-in
self.mne.use_opengl = (
get_config('MNE_BROWSE_USE_OPENGL', '').lower() == 'true')
if self.mne.use_opengl:
try:
import OpenGL
Expand Down
9 changes: 4 additions & 5 deletions mne_qt_browser/tests/test_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
not has_gl, reason=f'Requires PyOpengl (got {reason})')


@pytest.mark.filterwarnings('ignore:.*PyOpenGL was not found.*:RuntimeWarning')
@pytest.mark.benchmark
@pytest.mark.parametrize('benchmark_param', [
pytest.param({'use_opengl': False}, id='use_opengl=False'),
pytest.param({'use_opengl': True}, marks=gl_mark, id='use_opengl=True'),
pytest.param({'precompute': False}, marks=gl_mark, id='precompute=False'),
pytest.param({'precompute': True}, marks=gl_mark, id='precompute=True'),
pytest.param({}, marks=gl_mark, id='defaults'),
pytest.param({'use_opengl': True}, id='use_opengl=True', marks=gl_mark),
pytest.param({'precompute': False}, id='precompute=False'),
pytest.param({'precompute': True}, id='precompute=True'),
pytest.param({}, id='defaults'),
])
def test_scroll_speed(raw_orig, benchmark_param, store, pg_backend, request):
"""Test the speed of a parameter."""
Expand Down