@@ -126,6 +126,7 @@ class TestBasicVideoEncoding(TestCase):
126
126
def test_default_options (self ):
127
127
with av .open (self .sandboxed ("output.mov" ), "w" ) as output :
128
128
stream = output .add_stream ("mpeg4" )
129
+ self .assertIn (stream , output .streams .video )
129
130
self .assertEqual (stream .average_rate , Fraction (24 , 1 ))
130
131
self .assertEqual (stream .time_base , None )
131
132
@@ -152,6 +153,7 @@ def test_encoding_with_pts(self):
152
153
153
154
with av .open (path , "w" ) as output :
154
155
stream = output .add_stream ("libx264" , 24 )
156
+ self .assertIn (stream , output .streams .video )
155
157
stream .width = WIDTH
156
158
stream .height = HEIGHT
157
159
stream .pix_fmt = "yuv420p"
@@ -182,6 +184,7 @@ class TestBasicAudioEncoding(TestCase):
182
184
def test_default_options (self ):
183
185
with av .open (self .sandboxed ("output.mov" ), "w" ) as output :
184
186
stream = output .add_stream ("mp2" )
187
+ self .assertIn (stream , output .streams .audio )
185
188
self .assertEqual (stream .time_base , None )
186
189
187
190
# codec context properties
@@ -203,6 +206,7 @@ def test_transcode(self):
203
206
sample_fmt = "s16"
204
207
205
208
stream = output .add_stream ("mp2" , sample_rate )
209
+ self .assertIn (stream , output .streams .audio )
206
210
207
211
ctx = stream .codec_context
208
212
ctx .time_base = sample_rate
@@ -241,11 +245,13 @@ class TestEncodeStreamSemantics(TestCase):
241
245
def test_stream_index (self ):
242
246
with av .open (self .sandboxed ("output.mov" ), "w" ) as output :
243
247
vstream = output .add_stream ("mpeg4" , 24 )
248
+ self .assertIn (vstream , output .streams .video )
244
249
vstream .pix_fmt = "yuv420p"
245
250
vstream .width = 320
246
251
vstream .height = 240
247
252
248
253
astream = output .add_stream ("mp2" , 48000 )
254
+ self .assertIn (astream , output .streams .audio )
249
255
astream .channels = 2
250
256
astream .format = "s16"
251
257
@@ -277,6 +283,7 @@ def test_stream_index(self):
277
283
def test_set_id_and_time_base (self ):
278
284
with av .open (self .sandboxed ("output.mov" ), "w" ) as output :
279
285
stream = output .add_stream ("mp2" )
286
+ self .assertIn (stream , output .streams .audio )
280
287
281
288
# set id
282
289
self .assertEqual (stream .id , 0 )
0 commit comments