Skip to content

Draw a frame in test_examples_run - #831

Closed
hmaarrfk wants to merge 1 commit into
pygfx:mainfrom
hmaarrfk:demo-829-failing-example-test
Closed

Draw a frame in test_examples_run#831
hmaarrfk wants to merge 1 commit into
pygfx:mainfrom
hmaarrfk:demo-829-failing-example-test

Conversation

@hmaarrfk

Copy link
Copy Markdown
Contributor
Claude's draft

test_examples_run() ran an example's main block and stopped there. Under the offscreen canvas that only constructs the canvas and registers a draw function, so nothing is drawn and the draw function -- the bulk of most examples -- was never executed. Draw one frame for every example that exposes a canvas.

Drawing is not enough on its own: rendercanvas calls the draw function inside its log_exception() context, so an exception there is logged to the "rendercanvas" logger and swallowed, and a frame still comes out. Assert that nothing was logged there.

This makes the imgui examples fail against imgui_bundle 1.92.900, which is the bug reported in #829 and is fixed in the next commit.

Resume this Claude session:

cd /home/mark/git/wgpu-py
claude --resume 590dd7bc-312c-419e-ad3d-2c69d00943cd

<details><summary>Claude's draft</summary>

test_examples_run() ran an example's __main__ block and stopped there. Under
the offscreen canvas that only constructs the canvas and registers a draw
function, so nothing is drawn and the draw function -- the bulk of most
examples -- was never executed. Draw one frame for every example that exposes
a canvas.

Drawing is not enough on its own: rendercanvas calls the draw function inside
its log_exception() context, so an exception there is logged to the
"rendercanvas" logger and swallowed, and a frame still comes out. Assert that
nothing was logged there.

This makes the imgui examples fail against imgui_bundle 1.92.900, which is the
bug reported in pygfx#829 and is fixed in
the next commit.

Resume this Claude session:
```
cd /home/mark/git/wgpu-py
claude --resume 590dd7bc-312c-419e-ad3d-2c69d00943cd
```
</details>
@almarklein

Copy link
Copy Markdown
Member

Looks like this was added via #830

@hmaarrfk hmaarrfk closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants