Files
ffx/tests/unit/test_track_codec_identification.py
2026-04-13 20:15:10 +02:00

26 lines
643 B
Python

from __future__ import annotations
from pathlib import Path
import sys
import unittest
SRC_ROOT = Path(__file__).resolve().parents[2] / "src"
if str(SRC_ROOT) not in sys.path:
sys.path.insert(0, str(SRC_ROOT))
from ffx.track_codec import TrackCodec # noqa: E402
class TrackCodecIdentificationTests(unittest.TestCase):
def test_identify_modern_webm_codecs(self):
self.assertEqual(TrackCodec.VP9, TrackCodec.identify("vp9"))
self.assertEqual(TrackCodec.OPUS, TrackCodec.identify("opus"))
self.assertEqual(TrackCodec.WEBVTT, TrackCodec.identify("webvtt"))
if __name__ == "__main__":
unittest.main()