Skip to content

Commit

Permalink
Add Media.get_meta tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oaubert committed Jul 12, 2020
1 parent 46aa764 commit 3c9cf99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file modified tests/samples/sample.mp4
Binary file not shown.
12 changes: 12 additions & 0 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ def test_tracks_get(self):
self.assertEqual(audiotrack.bitrate, 83051)
self.assertEqual(m.get_duration(), 5568)

def test_meta_get(self):
self.assertTrue(os.path.exists(SAMPLE))
m = vlc.Media(SAMPLE)
m.parse()
self.assertEqual(m.get_meta(vlc.Meta.Title), 'Title')
self.assertEqual(m.get_meta(vlc.Meta.Artist), 'Artist')
self.assertEqual(m.get_meta(vlc.Meta.Description), 'Comment')
self.assertEqual(m.get_meta(vlc.Meta.Album), 'Album')
self.assertEqual(m.get_meta(vlc.Meta.AlbumArtist), 'Album Artist')
self.assertEqual(m.get_meta(vlc.Meta.Date), '2013')
self.assertEqual(m.get_meta(vlc.Meta.Genre), 'Sample')

def notest_log_get_context(self):
"""Semi-working test for log_get_context.
Expand Down

0 comments on commit 3c9cf99

Please sign in to comment.