Skip to content

fix(tests): expect forward-slash filename from spatialgeometry >= 1.4.1 - #702

Merged
petercorke merged 1 commit into
mainfrom
fix/test-mesh-filename-windows-sep
Sep 27, 2026
Merged

petercorke merged 1 commit into
mainfrom
fix/test-mesh-filename-windows-sep

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

tests/test_collision.py::TestToDict::test_mesh_filename asserts
Mesh.to_dict()["filename"] == str(f) (native path separators). SG 1.4.1
(released 2026-09-21, jhavl/swift#152) changed to_dict()["filename"] to
always normalize to forward slashes, for Swift's JS mesh loader on Windows
paths. Since pyproject.toml pins spatialgeometry>=1.4.0 (unbounded), any
CI run from that date onward picks up 1.4.1 and fails this assertion on
every Windows job — confirmed independently on #698 and #699, neither of
which touch this code path.

Fix: compare against f.as_posix() instead of str(f), matching SG's
documented normalization.

Related

Unblocks Windows CI on #698 and #699 (and any other open/future PR) once
merged and those branches are rebased/re-run.

Checklist

  • PR title follows Conventional Commits
  • Tests pass locally (macOS; verified against installed spatialgeometry 1.4.1)
  • PR is as small/focused as practical

🤖 Generated with Claude Code

Mesh.to_dict()["filename"] now normalizes to forward slashes (SG's
jhavl/swift#152 fix for Swift's JS mesh loader on Windows paths), which
broke test_mesh_filename's native-separator comparison on every Windows
CI job (confirmed on both #698 and #699, unrelated to either PR's own
changes) since SG 1.4.1 released 2026-09-21.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@petercorke
petercorke force-pushed the fix/test-mesh-filename-windows-sep branch from 7ab5ab1 to 097184c Compare September 27, 2026 11:46
@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (0b8fde6) to head (097184c).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #702   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        143     143           
  Lines      14093   14093           
=====================================
  Misses     14093   14093           

☔ 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.

@petercorke
petercorke merged commit c070066 into main Sep 27, 2026
23 of 24 checks passed
@petercorke
petercorke deleted the fix/test-mesh-filename-windows-sep branch September 27, 2026 12:19
@github-actions github-actions Bot mentioned this pull request Sep 27, 2026
petercorke added a commit that referenced this pull request Sep 27, 2026
…703)

spatialgeometry 1.4.1 (jhavl/spatialgeometry#49) now builds a genuine
py3-none-any wheel for Pyodide and publishes it to PyPI directly,
closing the gap this step's own comment anticipated
(jhavl/spatialgeometry#46). piplite/micropip already falls back to
PyPI for any package not staged in the local docs/lite/pypi index, so
no special-casing is needed -- confirmed with `pip download --platform
any --only-binary=:all: spatialgeometry==1.4.1` resolving the
py3-none-any wheel straight from PyPI.

The step had also gone from stale to broken: it targeted a
`cp312*pyodide*wasm32*` GitHub Release asset that no longer exists for
1.4.1 (superseded by the PyPI wheel above), which was failing the
docs-build job on every PR once the Windows test-matrix fix
(test_mesh_filename, #702) let it actually run.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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