Skip to content

Commit 6d6871c

Browse files
elpasonyalldawson
authored andcommittedSep 1, 2018
Skip test on travis and fix test case
1 parent e8ca9a2 commit 6d6871c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎tests/src/python/test_qgstaskmanager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,14 @@ def finished_multiple_value_result(e, results):
262262
self.assertEqual(result_value, 5)
263263
self.assertEqual(result_statement, 'whoo')
264264

265+
@unittest.skipIf(os.environ.get('TRAVIS', '') == 'true', 'Test is unstable on Travis')
265266
def testTaskFromFunctionWithSubTaskCompletedIsCalledOnce(self): # spellok
266267
""" test that when a parent task has subtasks it does emit taskCompleted only once"""
267268

268269
self.finished = 0
269270
self.completed = 0
270271

271-
def _on_finished():
272+
def _on_finished(e):
272273
self.finished += 1
273274

274275
def _on_completed():
@@ -284,7 +285,7 @@ def _on_completed():
284285

285286
QgsApplication.taskManager().addTask(task)
286287
while task.status() not in [QgsTask.Complete, QgsTask.Terminated]:
287-
pass
288+
QCoreApplication.processEvents()
288289
while QgsApplication.taskManager().countActiveTasks() > 0:
289290
QCoreApplication.processEvents()
290291

0 commit comments

Comments
 (0)
Please sign in to comment.