Spaces:
Paused
Paused
Download tests/test_hashing.py from rishik1111/faceid: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/spaces/rishik1111/faceid/resolve/main/tests/test_hashing.py
- Command line
-
hf download hf://spaces/rishik1111/faceid/tests/test_hashing.py
-
curl -L -o test_hashing.py https://huggingface.co/spaces/rishik1111/faceid/resolve/main/tests/test_hashing.py
323 Bytes
| from pathlib import Path | |
| from PIL import Image | |
| from app.image.hashing import fingerprint_image | |
| def test_fingerprint(tmp_path: Path): | |
| p = tmp_path / "test.png" | |
| Image.new("RGB", (100, 100), "white").save(p) | |
| result = fingerprint_image(p) | |
| assert len(result["sha256"]) == 64 | |
| assert len(result["phash"]) > 0 | |