Fix CI Test Failure in PyVista Example

Codex·GPT-6-astra·Maxwell-Rosen·yesterday·6min·1 Checkpoint·15 file changes·+233/-103·31.1K tokens

CI is failing tests/test_examples.py ........F................... tests/test_gdata_fluent.py ...... tests/test_gpython_array.py ................. tests/test_gpython_basis.py ...................................................... tests/test_gpython_kernels.py .................................................................. tests/test_gpython_lib.py ...... tests/test_gpython_rio.py .......................................................................... tests/test_invariants.py ........... tests/test_operations_animate.py ..... tests/test_operations_collect.py . tests/test_operations_curvilinear_diff_integrate.py ...... tests/test_operations_differentiate.py . tests/test_operations_evaluate.py ........... tests/test_operations_field.py ...... tests/test_operations_fit.py .. tests/test_operations_gk_fluxsurf.py ........ tests/test_operations_gk_geometry.py . tests/test_operations_gk_rz.py .......... tests/test_operations_local_poly.py ......... tests/test_operations_map.py ....................... tests/test_postgkyl.py ................ tests/test_render_matplotlib.py ..

=================================== FAILURES =================================== __________ TestTutorialScripts.test_script_runs_clean[09_pyvista.py] ___________ /Users/runner/work/postgkyl/postgkyl/tests/test_examples.py:69: running the test CRASHED with signal 6 (SIGABRT) ------------------------------- captured stderr -------------------------------- objc[10528]: +[NSNumber initialize] may have been in progress in another thread when fork() was called. objc[10528]: +[NSNumber initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. =========================== short test summary info ============================ SKIPPED [1] tests/test_docs_build.py:18: install the docs extra for website tests SKIPPED [1] tests/test_diagnostics_gk_load.py:895: distf delegates to load_distf, covered by TestLoadGkDistfReal against the real staged fixtures FAILED tests/test_examples.py::TestTutorialScripts::test_script_runs_clean[09_pyvista.py] - /Users/runner/work/postgkyl/postgkyl/tests/test_examples.py:69: running the test CRASHED with signal 6 (SIGABRT) ========== 1 failed, 553 passed, 2 skipped, 1431 deselected in 13.80s ========== Error: Process completed with exit code 1.

yesterday·3.6s

I’ll check how the tutorial tests launch PyVista and fix the macOS fork crash. I’m using the design, development, and testing skills for this change.

The macOS job uses pytest --forked, so PyVista runs inside a copy of an already initialized process. That matches the documented macOS fork failure. I’ll run tutorial scripts in a fresh Python interpreter on macOS, while preserving in-process coverage collection on other platforms.

The test setup also handles a known VTK shutdown crash and prevents GUI popups. I’ll preserve those protections by giving the tutorial tests their own pytest invocation without --forked in macOS CI. The remaining native tests will keep their current isolation.

All 29 tutorial tests pass locally, including 09_pyvista.py. The workflow change is in place; I’m checking the remaining native command and the full suite. This machine runs Linux, so macOS CI will need to confirm the platform-specific fix.

The broader checks are still running the documentation build tests, which take longer than the tutorial tests. Only the macOS CI workflow has changed.

The documentation build has passed its first check. The forked run rebuilds the docs for each test, so it is slower; validation is still in progress.

Updated macOS CI to run tutorial tests in a separate pytest session without --forked, avoiding PyVista’s Objective-C fork crash.

Linux validation: 1,988 passed, 6 skipped, including all 29 tutorial tests. The separate forked check timed out building docs. macOS confirmation awaits CI.