Skip to content

test: add e2e tests for AI annotation and model download#1933

Merged
wkentaro merged 1 commit intomainfrom
test/e2e-ai-annotation-and-model-download
Apr 8, 2026
Merged

test: add e2e tests for AI annotation and model download#1933
wkentaro merged 1 commit intomainfrom
test/e2e-ai-annotation-and-model-download

Conversation

@wkentaro
Copy link
Copy Markdown
Owner

@wkentaro wkentaro commented Apr 8, 2026

Summary

  • Add AI shape types (ai_points, ai_box × polygon, mask) to the existing parametrized test_annotate_shape_types, sharing the same click-label-verify flow
  • Add test_ai_model_download that monkeypatches osam.types._blob.Blob.path to a temp directory, exercising the full download dialog without touching the real ~/.cache/osam model cache
  • Replace fixed QTimer.singleShot with polling enter_label_when_visible for robust label dialog handling across all modes (handles AI download dialog preceding label dialog)

Test plan

  • make test — 91 passed
  • make lint — all checks passed
  • make coveragedownload.py 44% → 78%, _osam_session.py 34% → 83%, polygon_from_mask.py 33% → 90%

Add AI shape types (ai_points, ai_box × polygon, mask) to the existing
parametrized annotation test, sharing the same click-label-verify flow.

Add a dedicated test for the model download dialog by monkeypatching
osam's Blob.path to a temp directory, so the real model cache is
untouched while the full download flow is exercised.
@wkentaro wkentaro self-assigned this Apr 8, 2026
@wkentaro wkentaro added the test label Apr 8, 2026
@wkentaro wkentaro added this to the v6.1.0 milestone Apr 8, 2026
@wkentaro wkentaro merged commit 3131bce into main Apr 8, 2026
5 checks passed
@wkentaro wkentaro deleted the test/e2e-ai-annotation-and-model-download branch April 8, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant