test(delete_image): pin move_to_trash=False; add Py3.14 to CI matrix#286
Merged
Conversation
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>
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/backend/test_index.py::test_delete_imagewas returning 500 from/delete_image/on hosts where/tmpshares the/mount (e.g. zfs root pools).send2trashfalls 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 pinningmove_to_trash, so it relied on the OS trash being writable. Fix: passparams={"move_to_trash": False}so the test deterministically exercises the unlink code path (which is what its docstring says it tests anyway)..github/workflows/run_tests.ymlto run on both Python 3.10 and 3.14 across ubuntu/windows/macos, withfail-fast: falseso one cell's failure doesn't cancel the rest.Test plan
pytest tests/backend/test_index.py::test_delete_imagepasses on Python 3.14pytest tests/backend -m "not slow"→ 322 passed on Python 3.14ruff check photomap testsclean