Skip to content

Commit 4f6c271

Browse files
committed
move new composer tests to pyqt wrappers (followup 7a8a541 and f413046)
1 parent aef26c9 commit 4f6c271

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

scripts/qgis_fixes/fix_print_with_import.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ class FixPrintWithImport(FixPrintWithImportOrig):
66

77
def match(self, node):
88
isPrint = super(FixPrintWithImport, self).match(node)
9-
if isPrint and
10-
len(node.children) == 2 and \
11-
isinstance(node.children[0], Leaf) and \
12-
isinstance(node.children[1], Node) and node.children[1].type == syms.atom and \
13-
isinstance(node.children[1].children[0], Leaf) and node.children[1].children[0].value == '(' and \
14-
isinstance(node.children[1].children[-1], Leaf) and node.children[1].children[-1].value == ')':
9+
if isPrint and \
10+
len(node.children) == 2 and \
11+
isinstance(node.children[0], Leaf) and \
12+
isinstance(node.children[1], Node) and node.children[1].type == syms.atom and \
13+
isinstance(node.children[1].children[0], Leaf) and node.children[1].children[0].value == '(' and \
14+
isinstance(node.children[1].children[-1], Leaf) and node.children[1].children[-1].value == ')':
1515
return False
1616

1717
return ok

tests/src/python/test_qgscomposerpolygon.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
import qgis
1616

17-
from PyQt4.QtGui import QColor
18-
from PyQt4.QtGui import QPolygonF
19-
from PyQt4.QtCore import QPointF
17+
from PyQt.QtGui import QColor
18+
from PyQt.QtGui import QPolygonF
19+
from PyQt.QtCore import QPointF
2020

2121
from qgis.core import (QgsComposerPolygon,
2222
QgsComposerItem,

tests/src/python/test_qgscomposerpolyline.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
import qgis
1616

17-
from PyQt4.QtGui import QColor
18-
from PyQt4.QtGui import QPolygonF
19-
from PyQt4.QtCore import QPointF
17+
from PyQt.QtGui import QColor
18+
from PyQt.QtGui import QPolygonF
19+
from PyQt.QtCore import QPointF
2020

2121
from qgis.core import (QgsComposerPolyline,
2222
QgsComposerItem,

0 commit comments

Comments
 (0)