diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-03-21 13:26:33 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-03-22 10:35:46 +0000 |
commit | 7934b7a51a411b5ad10e6e7212729188520f94b8 (patch) | |
tree | b471ccfa251fc89d10706aa961198be321900d9b | |
parent | 7875fc2dcf6c1f8f6c323c7ad9146dd3681791c4 (diff) |
Fix testQPrinterGetPageMargins test
Setting the pageMargins did not work on macOS because the provided
values were smaller than the minimum allowed margins.
Change-Id: I822262cbb535bb27cfefc98522ad88f1db868c4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | tests/QtWidgets/returnquadruplesofnumbers_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/QtWidgets/returnquadruplesofnumbers_test.py b/tests/QtWidgets/returnquadruplesofnumbers_test.py index 45bcf7e9..39799040 100644 --- a/tests/QtWidgets/returnquadruplesofnumbers_test.py +++ b/tests/QtWidgets/returnquadruplesofnumbers_test.py @@ -81,8 +81,11 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication): def testQPrinterGetPageMargins(self): # Bug #742 obj = QPrinter() - values = (10.0, 20.0, 30.0, 40.0, QPrinter.Point) + # 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) obj.setPageMargins(*values) + print obj.getPageMargins(QPrinter.Point), values[:-1] self.assertTrue(self.compareTuples(obj.getPageMargins(QPrinter.Point), values[:-1])) if __name__ == "__main__": |