def test_formats(self): self.assertRaisesSpecific(ValueError, formats.BaseFormat().parse_options, {}) self.assertEqual(['-f', 'ogg'], formats.OggFormat().parse_options({'format': 'ogg'})) self.assertEqual(['-f', 'avi'], formats.AviFormat().parse_options({'format': 'avi'})) self.assertEqual(['-f', 'matroska'], formats.MkvFormat().parse_options({'format': 'mkv'})) self.assertEqual(['-f', 'webm'], formats.WebmFormat().parse_options({'format': 'webm'})) self.assertEqual(['-f', 'flv'], formats.FlvFormat().parse_options({'format': 'flv'})) self.assertEqual(['-f', 'mov'], formats.MovFormat().parse_options({'format': 'mov'})) self.assertEqual(['-f', 'mp4'], formats.Mp4Format().parse_options({'format': 'mp4'})) self.assertEqual(['-f', 'mpegts'], formats.MpegFormat().parse_options({'format': 'mpg'})) self.assertEqual(['-f', 'mp3'], formats.Mp3Format().parse_options({'format': 'mp3'})) self.assertEqual(['-f', 'msmpeg4'], formats.WmvFormat().parse_options({'format': 'wmv'}))
def test_formats(self): c = formats.BaseFormat() self.assertRaisesSpecific(ValueError, c.parse_options, {}) self.assertEqual(['-f', 'ogg'], formats.OggFormat().parse_options({'format': 'ogg'}))