mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
refactor(verification): extract shared text_labels cell and hash codec
- Move inline _text_labels lists into a shared text_labels cell - Replace inline np.packbits hash encoding with bits_tensor_to_hash_bytes - Add static tests to verify notebook API usage patterns
This commit is contained in:
20
tests/test_notebook_verification_static.py
Normal file
20
tests/test_notebook_verification_static.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
NOTEBOOK = Path(__file__).resolve().parents[1] / "notebooks" / "verification.py"
|
||||
|
||||
|
||||
def test_verification_notebook_uses_scenegraph_query_api():
|
||||
source = NOTEBOOK.read_text()
|
||||
|
||||
assert "query_image_against_scene_graph" in source
|
||||
assert "text_labels=text_labels" in source
|
||||
|
||||
|
||||
def test_verification_notebook_uses_hash_codec_for_object_hashes():
|
||||
source = NOTEBOOK.read_text()
|
||||
|
||||
assert "bits_tensor_to_hash_bytes" in source
|
||||
assert "np.packbits" not in source
|
||||
Reference in New Issue
Block a user