aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-01-07 11:19:06 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-01-24 13:30:15 +0100
commit0427a1ef134210064e6cdde6fcf8cf40804df13c (patch)
treef616a6ff27e71b1ef8695fde43878e54ad70f099
parent1dd33a41adba5d1737988353692f13deb54ca062 (diff)
Fix printer test in returnquadruplesofnumbers_test.py on some systems
Setting the page margin used for comparing tuples requires a PDF printer. Ensure PDF format if no such printer can be found. Change-Id: Ie8509d4a336392cb711e210842664e238c487444 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
index 1274973b4..48e637bcd 100644
--- a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
+++ b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
@@ -90,6 +90,8 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication):
break
if not printer:
printer = QPrinter()
+ printer.setPrinterName("Print to PDF")
+ printer.setOutputFormat(QPrinter.PdfFormat)
# On macOS the minimum margin of a page is ~12, setting something lower than that will
# actually fail to set all the margins.
values = (15.0, 16.0, 17.0, 18.0, QPrinter.Point)