-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST: add & reorder PySide6 + macOS tests; move Qt helpers into this repo
- Loading branch information
Showing
5 changed files
with
41 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
# Define decorators that can be used for pytest tests | ||
|
||
import pytest | ||
|
||
from glue.tests.helpers import PYQT5_INSTALLED, PYQT6_INSTALLED, PYSIDE2_INSTALLED, PYSIDE6_INSTALLED | ||
from glue.tests.helpers import make_marker, make_skipper, make_xfailer | ||
|
||
PYQT5_INSTALLED, requires_pyqt5 = make_skipper('PyQt5') | ||
PYQT6_INSTALLED, requires_pyqt6 = make_skipper('PyQt6') | ||
PYSIDE2_INSTALLED, requires_pyside2 = make_skipper('PySide2') | ||
PYSIDE6_INSTALLED, requires_pyside6 = make_skipper('PySide6') | ||
|
||
PYQT_INSTALLED = PYQT5_INSTALLED or PYQT6_INSTALLED | ||
PYSIDE_INSTALLED = PYSIDE2_INSTALLED or PYSIDE6_INSTALLED | ||
QT_INSTALLED = PYQT_INSTALLED or PYSIDE_INSTALLED | ||
|
||
requires_pyqt = pytest.mark.skipif(str(not PYQT5_INSTALLED and not PYQT6_INSTALLED), | ||
requires_pyqt = pytest.mark.skipif(str(not PYQT_INSTALLED), | ||
reason='An installation of PyQt is required') | ||
|
||
requires_pyside = pytest.mark.skipif(str(not PYSIDE2_INSTALLED and not PYSIDE6_INSTALLED), | ||
requires_pyside = pytest.mark.skipif(str(not PYSIDE_INSTALLED), | ||
reason='An installation of PySide is required') | ||
|
||
requires_qt = pytest.mark.skipif(str(not QT_INSTALLED), | ||
reason='An installation of Qt is required') | ||
|
||
PYQT_GT_59, _ = make_skipper('PyQt5', version='5.10') | ||
|
||
requires_pyqt_gt_59_or_pyside = pytest.mark.skipif(str(not (PYQT_GT_59 or PYQT6_INSTALLED | ||
or PYSIDE_INSTALLED)), | ||
reason='Requires PyQt > 5.9 or PySide2/6') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters