Skip to content

test(tricands): close leaked figures before each test#100

Merged
bartzbeielstein merged 1 commit into
developfrom
test/tricands-figure-isolation
Jun 10, 2026
Merged

test(tricands): close leaked figures before each test#100
bartzbeielstein merged 1 commit into
developfrom
test/tricands-figure-isolation

Conversation

@bartzbeielstein

Copy link
Copy Markdown
Contributor

Fixes the flaky test_visualization_2d failure on CI (run 27290133117, blocking release PR #99): the test mocks plt.figure, so tricands(vis=True) draws into whatever Axes gca() finds — under pytest-xdist that can be a 3D Axes leaked by an earlier test on the same worker, and Axes3D.scatter then raises ValueError: s must be a scalar.... Reproduced locally by pre-creating a 3D axes; fixed by plt.close('all') in setup_method.

🤖 Generated with Claude Code

test_visualization_2d mocks plt.figure, so tricands draws into whatever
Axes gca() finds. Under pytest-xdist a 3D Axes leaked by an earlier test
on the same worker makes scatter raise 's must be a scalar, or float
array-like with the same size as x and y' (seen on CI run 27290133117).
Close all figures in setup_method so the test owns its pyplot state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bartzbeielstein bartzbeielstein merged commit aec1f08 into develop Jun 10, 2026
@bartzbeielstein bartzbeielstein deleted the test/tricands-figure-isolation branch June 12, 2026 11:38
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.

1 participant