aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py')
-rw-r--r--sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
index 573ca9940..1c9ee918d 100644
--- a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
+++ b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
@@ -71,12 +71,6 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication):
obj = GraphicsLayoutItem()
self.assertTrue(self.compareTuples(obj.getContentsMargins(), (0.0, 0.0, 0.0, 0.0)))
- def testQWidgetGetContentsMargins(self):
- obj = QWidget()
- values = (10, 20, 30, 40)
- obj.setContentsMargins(*values)
- self.assertTrue(self.compareTuples(obj.getContentsMargins(), values))
-
def testQLayoutGetContentsMargins(self):
obj = Layout()
values = (10, 20, 30, 40)
@@ -87,25 +81,6 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication):
obj = QTextCursor()
self.assertEqual(obj.selectedTableCells(), (-1, -1, -1, -1))
- def testQPrinterGetPageMargins(self):
- # Bug #742. Find a printer like PDF/XPS on which arbitrary margins can be set.
- printer = None
- for printerInfo in QPrinterInfo.availablePrinters():
- name = printerInfo.printerName().lower()
- if "xps" in name or "pdf" in name:
- printer = QPrinter(printerInfo)
- 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)
- printer.setPageMargins(*values)
- actual = printer.getPageMargins(QPrinter.Point)
- print(printer.printerName(), actual, values[:-1])
- self.assertTrue(self.compareTuples(actual, values[:-1]))
if __name__ == "__main__":
unittest.main()