Several point-feature tests use bare except: pass, so a broken detector passes silently

Aperta Adatta ai principianti
#51 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
opencv, python

Direzione di ricerca

Inizia in tests/test_image_point_features.py con test_sift, test_surf, test_orb, test_corners e test_feature_properties, quindi confrontali con test_brisk e test_akaze. Esegui i test delle caratteristiche dei punti e fai emergere gli errori dei detector; quando un ambiente non può realmente eseguire un detector, verifica che venga saltato esplicitamente con una motivazione invece di passare silenziosamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

tech-debt

Found 2026-08-03 while adding regression tests for BRISK/AKAZE (see the opencv5 migration issue, #44). tests/test_image_point_features.py's test_sift, test_surf, test_orb, test_corners, and test_feature_properties all wrap the actual detector call in a bare try: ... except: pass. This means a completely broken detector (e.g. the exact AttributeError: BRISK_create not found bug fixed in #44) would make these tests pass silently instead of failing -- confirmed by construction while writing test_brisk/test_akaze without that pattern: reverting the BRISK/AKAZE fix makes the new tests fail loudly (as expected), but the same revert applied to SIFT/ORB would not be caught by the existing tests at all.

Fix

Remove the bare except: pass from these five tests; assert the real expected outcome directly (matching the pattern used for the new test_brisk/test_akaze). If a specific environment genuinely can't run one of these (e.g. SURF requiring a non-free build flag), skip explicitly with self.skipTest(reason) rather than swallowing all exceptions.

Lingua principale
Python
Stelle
220
Fork
30
Merge medio
12g 23h
PR unite (30g)
5

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di petercorke/machinevision-toolbox-python

Tutte le issue di petercorke/machinevision-toolbox-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.