Skip to content

Commit 5648d87

Browse files
committed
lets see where we time out
1 parent 0806a50 commit 5648d87

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.github/workflows/run-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ubuntu-latest, windows-latest, macos-latest]
23-
python-version: ['3.9', '3.10']
24-
pyqt-version: [5.12.3, 5.15.9]
22+
os: [windows-latest]
23+
python-version: ['3.10']
24+
pyqt-version: [5.15.9]
2525
env:
2626
DISPLAY: ':99.0'
2727
QT_MAC_WANTS_LAYER: 1 # PyQT gui tests involving qtbot interaction on macOS will fail without this
@@ -72,6 +72,6 @@ jobs:
7272
7373
- name: Test with pytest
7474
shell: bash -el {0}
75-
timeout-minutes: 30 # timeout applies to single run of run_tests.py, not all os/python combos
75+
timeout-minutes: 50 # 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)