@@ -16,7 +16,7 @@ def test_init_loom(tmp_path):
1616def test_init_loom_with_custom_frames_directory (tmp_path ):
1717 output_filepath = tmp_path / "output.gif"
1818 custom_frames_dir = tmp_path / "frames"
19-
19+
2020 loom_with_custom_dir = Loom (
2121 output_filepath = output_filepath ,
2222 frames_directory = custom_frames_dir ,
@@ -29,19 +29,19 @@ def test_init_loom_with_custom_frames_directory(tmp_path):
2929def test_save_frame (tmp_path ):
3030 output_filepath = tmp_path / "output.mp4"
3131 loom = Loom (output_filepath = output_filepath , verbose = True )
32-
32+
3333 fig = Figure ()
3434 ax = fig .subplots ()
3535 ax .plot ([0 , 1 ], [0 , 1 ])
36-
36+
3737 loom .save_frame (fig )
3838 assert len (loom .frame_filepaths ) == 1
3939 assert loom .frame_filepaths [0 ].exists ()
4040
4141def test_video_creation (tmp_path ):
4242 output_filepath = tmp_path / "output.mp4"
4343 loom = Loom (output_filepath = output_filepath , verbose = True )
44-
44+
4545 fig = Figure ()
4646 ax = fig .subplots ()
4747 ax .plot ([0 , 1 ], [0 , 1 ])
@@ -57,7 +57,7 @@ def test_dont_keep_frames(tmp_path):
5757 keep_frames = False ,
5858 verbose = True
5959 )
60-
60+
6161 fig = Figure ()
6262 ax = fig .subplots ()
6363 ax .plot ([0 , 1 ], [0 , 1 ])
@@ -128,3 +128,38 @@ def test_loom_error_handling(tmp_path):
128128
129129 frames_dir = Path (loom .frames_directory )
130130 assert not any (frames_dir .glob ("frame_*.png" ))
131+
132+ def test_show_ffmpeg_output (tmp_path ):
133+ output_filepath = tmp_path / "output.mp4"
134+
135+ loom = Loom (
136+ output_filepath = output_filepath ,
137+ show_ffmpeg_output = True ,
138+ verbose = False
139+ )
140+
141+ assert loom .show_ffmpeg_output is True
142+ assert loom .verbose is False
143+
144+ fig = Figure ()
145+ ax = fig .subplots ()
146+ ax .plot ([0 , 1 ], [0 , 1 ])
147+
148+ loom .save_frame (fig )
149+ loom .save_video ()
150+
151+ assert loom .output_filepath .exists ()
152+
153+ output_filepath2 = tmp_path / "output2.mp4"
154+ loom2 = Loom (output_filepath = output_filepath2 )
155+
156+ assert loom2 .show_ffmpeg_output is False
157+
158+ fig2 = Figure ()
159+ ax2 = fig2 .subplots ()
160+ ax2 .plot ([1 , 2 ], [1 , 2 ])
161+
162+ loom2 .save_frame (fig2 )
163+ loom2 .save_video ()
164+
165+ assert loom2 .output_filepath .exists ()
0 commit comments