Skip to content
Permalink
Browse files

Skip test on travis and fix test case

  • Loading branch information
elpaso authored and nyalldawson committed Aug 31, 2018
1 parent e8ca9a2 commit 6d6871ca5599840d7e571de313b80b8b5037abdc
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/src/python/test_qgstaskmanager.py
@@ -262,13 +262,14 @@ def finished_multiple_value_result(e, results):
self.assertEqual(result_value, 5)
self.assertEqual(result_statement, 'whoo')

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

self.finished = 0
self.completed = 0

def _on_finished():
def _on_finished(e):
self.finished += 1

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

QgsApplication.taskManager().addTask(task)
while task.status() not in [QgsTask.Complete, QgsTask.Terminated]:
pass
QCoreApplication.processEvents()
while QgsApplication.taskManager().countActiveTasks() > 0:
QCoreApplication.processEvents()

0 comments on commit 6d6871c

Please sign in to comment.
You can’t perform that action at this time.