1234567891011121314151617181920 |
- import mutagen
- from symuid._tag_interface import MP4
- # pylint: disable=protected-access
- def test_set_comment(empty_mp4_path):
- iface = MP4(mutagen.File(empty_mp4_path))
- assert iface.get_comment() is None
- iface.set_comment('latin')
- assert iface.get_comment() == 'latin'
- iface.set_comment('mp4 你好')
- assert iface.get_comment() == 'mp4 你好'
- iface.save()
- iface_reread = MP4(mutagen.File(empty_mp4_path))
- assert iface_reread.get_comment() == 'mp4 你好'
- tags = mutagen.File(iface.track_path).tags
- assert len(tags) == 1
- assert tags.items()[0] == ('©cmt', ['mp4 你好'])
|