Skip to content

Commit

Permalink
Test PyQgsRelationEditWidget updates
Browse files Browse the repository at this point in the history
 * QApplication is in QtWidgets, not QtGui
 * Expected failure only affects the travis Qt4 platform
  • Loading branch information
m-kuhn committed Apr 15, 2016
1 parent 129ff7c commit aa0b9fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/src/python/test_qgsrelationeditwidget.py
Expand Up @@ -34,8 +34,7 @@
)

from PyQt.QtCore import QTimer
from PyQt.QtWidgets import QToolButton, QTableView
from PyQt.QtGui import QApplication
from PyQt.QtWidgets import QToolButton, QTableView, QApplication
from qgis.testing import start_app, unittest

start_app()
Expand Down Expand Up @@ -103,7 +102,7 @@ def test_delete_feature(self):

self.assertEquals(1, len([f for f in self.vl_b.getFeatures()]))

fid = self.vl_b.getFeatures(QgsFeatureRequest().setFilterExpression('"name"=\'Design Patterns. Elements of Reusable Object-Oriented Software\'')).next().id()
fid = next(self.vl_b.getFeatures(QgsFeatureRequest().setFilterExpression('"name"=\'Design Patterns. Elements of Reusable Object-Oriented Software\''))).id()

self.widget.featureSelectionManager().select([fid])

Expand All @@ -126,7 +125,7 @@ def test_list(self):

self.assertEquals(self.table_view.model().rowCount(), 4)

@unittest.expectedFailure
@unittest.expectedFailure(os.environ['QT_VERSION'] == '4' and os.environ['TRAVIS_OS_NAME'] == 'linux') # It's probably not related to this variables at all, but that's the closest we can get to the real source of this problem at the moment...
def test_add_feature(self):
"""
Check if a new related feature is added
Expand Down

0 comments on commit aa0b9fa

Please sign in to comment.