Skip to content

test(delete_image): pin move_to_trash=False; add Py3.14 to CI matrix#286

Merged
lstein merged 6 commits into
masterfrom
lstein/fix/delete-image-test-py314
May 26, 2026
Merged

test(delete_image): pin move_to_trash=False; add Py3.14 to CI matrix#286
lstein merged 6 commits into
masterfrom
lstein/fix/delete-image-test-py314

Conversation

@lstein
Copy link
Copy Markdown
Owner

@lstein lstein commented May 25, 2026

Summary

  • tests/backend/test_index.py::test_delete_image was returning 500 from /delete_image/ on hosts where /tmp shares the / mount (e.g. zfs root pools). send2trash falls back to creating the freedesktop trash at <mount-root>/.Trash-<uid> — i.e. /.Trash-1000 — which a non-root user can't write to. The test wasn't pinning move_to_trash, so it relied on the OS trash being writable. Fix: pass params={"move_to_trash": False} so the test deterministically exercises the unlink code path (which is what its docstring says it tests anyway).
  • Extended .github/workflows/run_tests.yml to run on both Python 3.10 and 3.14 across ubuntu/windows/macos, with fail-fast: false so one cell's failure doesn't cancel the rest.

Test plan

  • pytest tests/backend/test_index.py::test_delete_image passes on Python 3.14
  • pytest tests/backend -m "not slow" → 322 passed on Python 3.14
  • ruff check photomap tests clean
  • Workflow YAML parses
  • CI: confirm all 6 matrix cells (3 OS × 2 Python) go green

lstein and others added 5 commits May 25, 2026 18:04
test_delete_image was returning 500 from /delete_image/ on hosts where
/tmp shares the / mount: send2trash falls back to creating the
freedesktop trash at the mount root (/.Trash-<uid>), which a non-root
user can't write to. Pin move_to_trash=False so the test deterministically
exercises the unlink path; the send2trash branch is a one-line third-party
call and doesn't need test coverage.

Also extends the backend test workflow to run on both Python 3.10 and
3.14 across ubuntu/windows/macos, with fail-fast disabled so one cell's
failure doesn't cancel the rest.
….jit warning

- routers/curation.py: Windows Path.resolve() accepts embedded null bytes
  where POSIX rejects them, so test_export_validation's "/\x00invalid"
  case fell through to validate_album_exists() and returned 404 instead
  of 400 on Windows Py3.14. Add an explicit null-byte check before
  resolve().
- pytest.ini: filter the `torch.jit.load is not supported in Python
  3.14+` DeprecationWarning emitted by clip-anytorch (legacy
  openai-clip:ViT-B/32 encoder). Third-party; the call still works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lstein lstein enabled auto-merge (squash) May 26, 2026 02:49
@lstein lstein disabled auto-merge May 26, 2026 03:02
…gate

Why: branch ruleset required `run_tests (<os>)` contexts, which the
matrix no longer produces after the python-version axis was added. A
single aggregator decouples the ruleset from matrix shape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lstein lstein merged commit aef5808 into master May 26, 2026
9 checks passed
@lstein lstein deleted the lstein/fix/delete-image-test-py314 branch May 26, 2026 03:17
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