Skip to content

Commit

Permalink
Fix qglue tests
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Aug 10, 2023
1 parent dd74d0e commit 2c78c2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions glue/qglue.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

try:
from glue.core import BaseData, Data
from glue.core.parsers import parse_data, parse_links
except ImportError:
# let qglue import, even though this won't work
# qglue will throw an ImportError
Expand Down
9 changes: 8 additions & 1 deletion glue/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def make_marker(mark_creator, module, label=None, version=None, mark_if='lt'):
if label == 'PyQt5': # PyQt5 does not use __version__
from PyQt5 import QtCore
version_installed = QtCore.PYQT_VERSION_STR
elif label == 'PyQt6': # PyQt6 does not use __version__
from PyQt6 import QtCore
version_installed = QtCore.PYQT_VERSION_STR
else:
mod = __import__(module)
version_installed = mod.__version__
Expand Down Expand Up @@ -73,11 +76,15 @@ def mark_creator(installed, lbl, vrs):
H5PY_INSTALLED, requires_h5py = make_skipper('h5py')

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')

print(PYQT5_INSTALLED , PYQT6_INSTALLED , PYSIDE2_INSTALLED , PYSIDE6_INSTALLED)

HYPOTHESIS_INSTALLED, requires_hypothesis = make_skipper('hypothesis')

QT_INSTALLED = PYQT5_INSTALLED or PYSIDE2_INSTALLED
QT_INSTALLED = PYQT5_INSTALLED or PYQT6_INSTALLED or PYSIDE2_INSTALLED or PYSIDE6_INSTALLED

SPECTRAL_CUBE_INSTALLED, requires_spectral_cube = make_skipper('spectral_cube',
label='spectral-cube')
Expand Down

0 comments on commit 2c78c2a

Please sign in to comment.