1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
Author: Michael R. Crusoe <crusoe@debian.org>
Description: Fix test for PyQT6
Forwarded: not-needed
--- python-pymeasure.orig/tests/display/test_inputs.py
+++ python-pymeasure/tests/display/test_inputs.py
@@ -241,8 +241,8 @@
p.assert_called_once_with(5.0)
@pytest.mark.parametrize("locale, decimalSep", [
- [QtCore.QLocale(31, 7, 224), "."], # UK locale for period
- [QtCore.QLocale(30, 7, 151), ","], # NL locale for comma
+ [QtCore.QLocale(QtCore.QLocale.Language.English, QtCore.QLocale.Script.LatinScript, QtCore.QLocale.Country.UnitedKingdom), "."], # UK locale for period
+ [QtCore.QLocale(QtCore.QLocale.Language.Dutch, QtCore.QLocale.Script.LatinScript, QtCore.QLocale.Country.Netherlands), ","], # NL locale for comma
])
def test_locale_settings(self, qtbot, locale, decimalSep):
assert locale.decimalPoint() == decimalSep
--- python-pymeasure.orig/tests/display/widgets/test_inputs_widget.py
+++ python-pymeasure/tests/display/widgets/test_inputs_widget.py
@@ -54,14 +54,14 @@
assert wdg.x.isVisibleTo(wdg) is True
assert wdg.x.isEnabled() is True
- qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par.height()/2)))
assert wdg.toggle_par.isChecked() is False
assert wdg.x.isVisibleTo(wdg) is exp_visible
assert wdg.x.isEnabled() is exp_enabled
- qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par.height()/2)))
assert wdg.toggle_par.isChecked() is True
@@ -86,7 +86,7 @@
assert wdg.toggle_par.isChecked() is False
assert wdg.x.isVisibleTo(wdg) is False
- qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par.height()/2)))
assert wdg.toggle_par.isChecked() is True
@@ -109,28 +109,28 @@
assert wdg.toggle_par2.isChecked() is False
assert wdg.x.isVisibleTo(wdg) is True
- qtbot.mouseClick(wdg.toggle_par1, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par1, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par1.height()/2)))
assert wdg.toggle_par1.isChecked() is False
assert wdg.toggle_par2.isChecked() is False
assert wdg.x.isVisibleTo(wdg) is False
- qtbot.mouseClick(wdg.toggle_par2, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par2, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par2.height()/2)))
assert wdg.toggle_par1.isChecked() is False
assert wdg.toggle_par2.isChecked() is True
assert wdg.x.isVisibleTo(wdg) is False
- qtbot.mouseClick(wdg.toggle_par1, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par1, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par1.height()/2)))
assert wdg.toggle_par1.isChecked() is True
assert wdg.toggle_par2.isChecked() is True
assert wdg.x.isVisibleTo(wdg) is False
- qtbot.mouseClick(wdg.toggle_par2, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par2, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par2.height()/2)))
assert wdg.toggle_par1.isChecked() is True
@@ -157,13 +157,13 @@
assert wdg.toggle_par.isChecked() is True
assert wdg.x.isVisibleTo(wdg) is condition
- qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par.height()/2)))
assert wdg.toggle_par.isChecked() is False
assert wdg.x.isVisibleTo(wdg) is not condition
- qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.LeftButton,
+ qtbot.mouseClick(wdg.toggle_par, QtCore.Qt.MouseButton.LeftButton,
pos=QtCore.QPoint(2, int(wdg.toggle_par.height()/2)))
assert wdg.toggle_par.isChecked() is True
|