Commit fb2f641
committed
Make test_examples_run actually draw a frame
<details><summary>Claude's draft</summary>
test_examples_run() ran an example's main block and stopped there. Under the
offscreen canvas that only builds the canvas and registers a draw function —
nothing is drawn — so the draw function, which is the bulk of most examples,
was never executed. That is how #829 slipped through CI: the imgui examples
passed while ImguiWgpuBackend.render() was never entered.
Draw one frame after running the main block, for every example that exposes a
canvas. Also assert nothing was logged to the "rendercanvas" logger, because
rendercanvas calls the draw function inside its log_exception() context: an
exception there is logged and swallowed, and a frame still comes out, so
drawing without checking the log would prove nothing.
This drops the separate tests/test_util_imgui.py and the ci.yml change that
went with it; the existing `pytest -v examples` job already installs
imgui_bundle and now covers the backend.
Verified with imgui_bundle 1.92.900: both imgui examples fail without the
backend fix and pass with it, and the whole examples suite passes on 1.92.0
and 1.92.900.
Resume this Claude session:
```
cd /home/mark/git/wgpu-py
claude --resume 590dd7bc-312c-419e-ad3d-2c69d00943cd
```
</details>1 parent 797a0d9 commit fb2f641
3 files changed
Lines changed: 18 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
181 | 182 | | |
182 | | - | |
183 | | - | |
184 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
| |||
This file was deleted.
0 commit comments