Download tests/test_metadata.py from RYUK999/TeleSave: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/RYUK999/TeleSave/resolve/main/tests/test_metadata.py
- Command line
-
hf download hf://spaces/RYUK999/TeleSave/tests/test_metadata.py
-
curl -L -o test_metadata.py https://huggingface.co/spaces/RYUK999/TeleSave/resolve/main/tests/test_metadata.py
500 Bytes
| from pathlib import Path | |
| from telesave.core.models import MediaKind | |
| from telesave.downloaders.metadata import guess_media_kind | |
| def test_guess_video_kind() -> None: | |
| assert guess_media_kind(Path("clip.mp4"), "video/mp4") is MediaKind.VIDEO | |
| def test_guess_photo_kind() -> None: | |
| assert guess_media_kind(Path("image.jpg"), "image/jpeg") is MediaKind.PHOTO | |
| def test_guess_document_fallback() -> None: | |
| assert guess_media_kind(Path("archive.zip"), "application/zip") is MediaKind.DOCUMENT | |