Skip to content

Commit 9b64529

Browse files
committed
TST/MNT: in pyside6 designer is named 'pyside6-designer', also disable designer plugin test on pyside6
disable the test for now (until custom pydm-widgets work in pyside6-designer), so in the meantime we can enable all other tests to run on pyside6 in automation.
1 parent d9240ce commit 9b64529

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pydm/main_window.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from qtpy.QtWidgets import QApplication, QMainWindow, QFileDialog, QAction, QMessageBox
55
from qtpy.QtCore import Qt, QTimer, Slot, QSize, QLibraryInfo, QCoreApplication
66
from qtpy.QtGui import QKeySequence
7-
from .utilities import IconFont, find_file, establish_widget_connections, close_widget_connections
7+
from .utilities import IconFont, find_file, establish_widget_connections, close_widget_connections, ACTIVE_QT_WRAPPER, QtWrapperTypes
88
from .pydm_ui import Ui_MainWindow
99
from .display import Display, ScreenTarget, load_file, clear_compiled_ui_file_cache
1010
from .connection_inspector import ConnectionInspector
@@ -111,11 +111,14 @@ def __init__(
111111
QLibraryInfo.location(QLibraryInfo.BinariesPath),
112112
QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath),
113113
)
114+
115+
# look into mac and windows naming later
116+
executable_name = "designer" if ACTIVE_QT_WRAPPER == QtWrapperTypes.PYQT5 else "pyside6-designer"
114117
for bin_path in possible_designer_bin_paths:
115118
if platform.system() == "Darwin":
116119
designer_path = os.path.join(bin_path, "Designer.app/Contents/MacOS/Designer")
117120
elif platform.system() == "Linux":
118-
designer_path = os.path.join(bin_path, "designer")
121+
designer_path = os.path.join(bin_path, executable_name)
119122
else:
120123
designer_path = os.path.join(bin_path, "designer.exe")
121124
if os.path.isfile(designer_path):

pydm/tests/test_plugins_import.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
from ..widgets.qtplugin_base import qtplugin_factory
1+
import pytest
2+
from ..utilities import ACTIVE_QT_WRAPPER, QtWrapperTypes
3+
if ACTIVE_QT_WRAPPER == QtWrapperTypes.PYSIDE6:
4+
pytest.skip("pydm with pyside6 does not support custom pydm-widgets yet in pyside6-designer!", allow_module_level=True)
25

6+
from ..widgets.qtplugin_base import qtplugin_factory
37

48
def test_import_byte_plugin():
59
# Byte plugin

0 commit comments

Comments
 (0)