aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtGui
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2023-02-27 09:19:24 +0100
committerFriedemann Kleint <[email protected]>2023-02-27 09:53:40 +0100
commit8fc33607461cdb697ba607ac3d74dd37c14479e6 (patch)
tree7934eaec4d31ecf1fafd975d99c8b86c553fadfd /sources/pyside6/tests/QtGui
parentff40e74847cae1e746fc857597209294ca2c2568 (diff)
shiboken6: Mangle field name "from"
Fixes: PYSIDE-2237 Pick-to: 6.4 Change-Id: I9993bbaf545e2868a5be900f793e5ae23f17235f Reviewed-by: Shyamnath Premnadh <[email protected]>
Diffstat (limited to 'sources/pyside6/tests/QtGui')
-rw-r--r--sources/pyside6/tests/QtGui/qtextdocument_functions.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtGui/qtextdocument_functions.py b/sources/pyside6/tests/QtGui/qtextdocument_functions.py
index 3329b1aee..2ac72df56 100644
--- a/sources/pyside6/tests/QtGui/qtextdocument_functions.py
+++ b/sources/pyside6/tests/QtGui/qtextdocument_functions.py
@@ -10,7 +10,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(False)
-from PySide6.QtGui import Qt
+from PySide6.QtGui import QPageRanges, Qt
class QTextDocumentFunctions(unittest.TestCase):
@@ -22,5 +22,16 @@ class QTextDocumentFunctions(unittest.TestCase):
self.assertEqual(html, '<p>A &amp; B</p>')
+class QPageRangesTest(unittest.TestCase):
+ """PYSIDE-2237: Test that field QPageRanges.Range.from is properly mangled."""
+
+ def test(self):
+ pr = QPageRanges()
+ pr.addPage(1)
+ r0 = pr.toRangeList()[0]
+ self.assertEqual(r0.from_, 1)
+ self.assertEqual(r0.to, 1)
+
+
if __name__ == '__main__':
unittest.main()