Skip to content

Commit

Permalink
Test run: make pytestqt use the Qt API detected by QtPy
Browse files Browse the repository at this point in the history
  • Loading branch information
StSav012 committed Feb 18, 2023
1 parent e90bb1a commit 966be08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qtpy/tests/test_qtgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

import pytest

from qtpy import PYQT5, PYQT_VERSION, PYSIDE2, PYSIDE6, QtCore, QtGui, QtWidgets
from qtpy import PYQT5, PYQT_VERSION, PYSIDE2, PYSIDE6, QtCore, QtGui, QtWidgets, API
from qtpy.tests.utils import not_using_conda


# This may prevent the crashes on Ubuntu with `conda=No`
def _qapp():
return QtWidgets.QApplication.instance() or QtWidgets.QApplication([sys.executable, __file__])
from pytestqt.qt_compat import qt_api

qt_api.set_qt_api(API)


@pytest.mark.skipif(
Expand Down Expand Up @@ -67,7 +67,7 @@ def test_enum_access():
assert QtGui.QImage.Format_Invalid == QtGui.QImage.Format.Format_Invalid


def test_QMouseEvent_pos_functions(qtbot, app=_qapp()):
def test_QMouseEvent_pos_functions(qtbot):
"""
Test `QMouseEvent.pos` and related functions removed in Qt 6,
and `QMouseEvent.position`, etc., missing from Qt 5.
Expand Down

0 comments on commit 966be08

Please sign in to comment.