Skip to content

test: attach meshes with with_mesh() in the unstructured plotting tests - #5796

Merged
BradyPlanden merged 1 commit into
mainfrom
fix/plotting-tests-with-mesh
Sep 25, 2026
Merged

BradyPlanden merged 1 commit into
mainfrom
fix/plotting-tests-with-mesh

Conversation

@BradyPlanden

Copy link
Copy Markdown
Member

Description

#5690's unstructured plotting tests attach a mesh by setting .mesh on a symbol. #5779 made symbols immutable, so on main 27 tests in test_plot_vtk.py and test_unstructured_plot_grid.py fail on every platform:

AttributeError: Cannot set 'mesh' on StateVector 'y[0:1]': symbols are immutable once constructed.

This builds those symbols with with_mesh() instead. It changes only tests. The same commit is in #5785, where CI caught it.

Type of change

Tests only, so no CHANGELOG entry.

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctests
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

The VTK and unstructured plot-grid tests (#5690) set .mesh on symbols
after building them, which #5779 forbids now that symbols are
immutable, so all 27 raised AttributeError. They now build each symbol
with with_mesh().
@BradyPlanden
BradyPlanden requested a review from a team as a code owner September 25, 2026 15:46
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.00%. Comparing base (f4f8de1) to head (b0c670b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5796      +/-   ##
==========================================
- Coverage   98.20%   98.00%   -0.21%     
==========================================
  Files         345      346       +1     
  Lines       34857    35259     +402     
==========================================
+ Hits        34232    34554     +322     
- Misses        625      705      +80     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BradyPlanden
BradyPlanden merged commit 34be6c2 into main Sep 25, 2026
40 of 42 checks passed
@BradyPlanden
BradyPlanden deleted the fix/plotting-tests-with-mesh branch September 25, 2026 16:07
rtimms pushed a commit that referenced this pull request Sep 28, 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