You've already forked gnatstudio
mirror of
https://github.com/AdaCore/gnatstudio.git
synced 2026-02-12 12:42:33 -08:00
Stabilize test on Windows (no-issue-check)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
gnatstudio.png
|
||||
@@ -7,26 +7,11 @@ from gs_utils.internal.utils import *
|
||||
|
||||
@run_test_driver
|
||||
def test_driver():
|
||||
yield wait_tasks()
|
||||
b = GPS.EditorBuffer.get(GPS.File("m.adb"))
|
||||
b.select(GPS.EditorLocation(b, 6, 45), GPS.EditorLocation(b, 6, 45))
|
||||
yield timeout(500)
|
||||
yield wait_tasks()
|
||||
GPS.execute_action("Find All References")
|
||||
task_hud_label = get_widget_by_name("task_hud_label")
|
||||
|
||||
label = ""
|
||||
count = 0
|
||||
# wait_until_true() has a granularity of 500ms, so it might miss
|
||||
# the label update if it's shorter than this granularity. So use
|
||||
# a manual loop instead.
|
||||
while label == "":
|
||||
label = task_hud_label.get_text()
|
||||
if "[Ada]" in label:
|
||||
break
|
||||
count += 1
|
||||
if count > 200:
|
||||
break
|
||||
yield timeout(10)
|
||||
|
||||
gps_assert(label, "[Ada] querying references",
|
||||
"Wrong task label after 'find all references'")
|
||||
tasks_labels = [task.label() for task in GPS.Task.list()]
|
||||
gps_assert("[Ada] querying references" in tasks_labels, True,
|
||||
"Wrong task label after 'find all references': %s" % str(tasks_labels))
|
||||
|
||||
Reference in New Issue
Block a user