diff options
Diffstat (limited to 'sources/pyside6/tests/QtGui')
-rw-r--r-- | sources/pyside6/tests/QtGui/qtextdocument_functions.py | 13 |
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 & 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() |