mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Astyle
This commit is contained in:
parent
e444f00cc5
commit
0bffff05b3
@ -203,16 +203,16 @@ class TestQgsLayoutPageCollection(unittest.TestCase):
|
||||
l = QgsLayout(p)
|
||||
collection = l.pageCollection()
|
||||
|
||||
#add a page
|
||||
# add a page
|
||||
page = QgsLayoutItemPage(l)
|
||||
page.setPageSize('A4')
|
||||
collection.addPage(page)
|
||||
|
||||
#should be positioned at origin
|
||||
# should be positioned at origin
|
||||
self.assertEqual(page.pos().x(), 0)
|
||||
self.assertEqual(page.pos().y(), 0)
|
||||
|
||||
#second page
|
||||
# second page
|
||||
page2 = QgsLayoutItemPage(l)
|
||||
page2.setPageSize('A5')
|
||||
collection.addPage(page2)
|
||||
@ -222,7 +222,7 @@ class TestQgsLayoutPageCollection(unittest.TestCase):
|
||||
self.assertEqual(page2.pos().x(), 0)
|
||||
self.assertEqual(page2.pos().y(), 307)
|
||||
|
||||
#third page, slotted in middle
|
||||
# third page, slotted in middle
|
||||
page3 = QgsLayoutItemPage(l)
|
||||
page3.setPageSize('A3')
|
||||
collection.insertPage(page3, 1)
|
||||
@ -373,5 +373,6 @@ class TestQgsLayoutPageCollection(unittest.TestCase):
|
||||
self.assertEqual(collection.pageAtPoint(QPointF(10, 500)), page2)
|
||||
self.assertFalse(collection.pageAtPoint(QPointF(10, 600)))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user