Skip to content

Commit

Permalink
Skip test on travis and fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Sep 1, 2018
1 parent e8ca9a2 commit 6d6871c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/src/python/test_qgstaskmanager.py
Expand Up @@ -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():
Expand All @@ -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()

Expand Down

0 comments on commit 6d6871c

Please sign in to comment.