26 lines
643 B
Python
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()
|