Skip to content

Commit a790285

Browse files
Add test
1 parent 10a5755 commit a790285

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_config.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pathlib import Path
55

66
import numpy as np
7+
import pytest
78

89
from manim import WHITE, Scene, Square, Tex, Text, tempconfig
910
from manim._config.utils import ManimConfig
@@ -33,6 +34,20 @@ def test_tempconfig(config):
3334
assert config[k] == v
3435

3536

37+
@pytest.mark.parametrize(
38+
("format", "expected_file_extension"),
39+
[
40+
("mp4", ".mp4"),
41+
("webm", ".webm"),
42+
("mov", ".mov"),
43+
("gif", ".mp4"),
44+
],
45+
)
46+
def test_resolve_file_extensions(config, format, expected_file_extension):
47+
config.format = format
48+
assert config.movie_file_extension == expected_file_extension
49+
50+
3651
class MyScene(Scene):
3752
def construct(self):
3853
self.add(Square())

0 commit comments

Comments
 (0)