File: test_options.py

package info (click to toggle)
python-av 16.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,684 kB
  • sloc: python: 7,607; sh: 182; ansic: 174; makefile: 135
file content (17 lines) | stat: -rw-r--r-- 532 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from av import ContainerFormat
from av.option import Option, OptionType


class TestOptions:
    def test_mov_options(self) -> None:
        mov = ContainerFormat("mov")
        options = mov.descriptor.options  # type: ignore
        by_name = {opt.name: opt for opt in options}

        opt = by_name.get("use_absolute_path")

        assert isinstance(opt, Option)
        assert opt.name == "use_absolute_path"

        # This was not a good option to actually test.
        assert opt.type in (OptionType.BOOL, OptionType.INT)