Skip to content

Commit 03f2018

Browse files
committed
lets see where we time out
1 parent 0806a50 commit 03f2018

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ jobs:
7474
shell: bash -el {0}
7575
timeout-minutes: 30 # timeout applies to single run of run_tests.py, not all os/python combos
7676
run: |
77-
python run_tests.py
77+
python run_tests.py -s

pydm/tests/widgets/test_rules.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,31 +230,55 @@ def test_rules_invalid_expr(qtbot, caplog):
230230
}
231231
]
232232

233+
print("! 1")
233234
dispatcher = RulesDispatcher()
235+
print("! 2")
234236
dispatcher.register(widget, rules)
237+
print("! 3")
235238

236239
re = dispatcher.rules_engine
240+
print("! 3")
241+
237242
assert weakref.ref(widget) in re.widget_map
243+
print("! 4")
244+
238245
assert len(re.widget_map[weakref.ref(widget)]) == 1
246+
print("! 5")
247+
239248
assert re.widget_map[weakref.ref(widget)][0]["rule"] == rules[0]
249+
print("! 6")
240250

241251
caplog.clear()
252+
print("! 7")
242253

243254
rules[0]["expression"] = "foo"
255+
print("! 8")
256+
244257
dispatcher.register(widget, rules)
258+
print("! 9")
259+
245260
assert len(re.widget_map[weakref.ref(widget)]) == 1
261+
print("! 10")
262+
246263
re.callback_conn(weakref.ref(widget), 0, 0, value=True)
264+
print("! 11")
265+
247266
re.callback_value(weakref.ref(widget), 0, 0, trigger=True, value="a")
267+
print("! 12")
248268

249269
# Wait for rule to execute but keep app responsive
250270
qtbot.wait(5000)
271+
print("! 13")
251272

252273
for record in caplog.records:
253274
assert record.levelno == logging.ERROR
254275
assert "Error while evaluating Rule" in caplog.text
255276

277+
print("! 14")
278+
256279
dispatcher.unregister(widget)
257280
assert weakref.ref(widget) not in re.widget_map
281+
print("! 15")
258282

259283

260284
def test_rules_initial_value(qtbot, caplog):

0 commit comments

Comments
 (0)