File: test_strval.py

package info (click to toggle)
pytaglib 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,136 kB
  • sloc: python: 429; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- coding: utf-8 -*-
# Copyright 2011-2016 Michael Helmling
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation
#
import taglib


def test_string_value_is_converted_to_list(test_data):
    f = test_data("testöü.flac")
    tf = taglib.File(f)
    tf.tags["AAA"] = "A TAG"
    tf.tags["BBB"] = b"ANOTHER TAG"
    tf.save()
    tf.close()
    del tf
    tf = taglib.File(f)
    assert tf.tags["AAA"] == ["A TAG"]
    assert tf.tags["BBB"] == ["ANOTHER TAG"]
    tf.close()