File: test_tagprinter.py

package info (click to toggle)
tagpy 2025.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: cpp: 1,011; python: 541; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pathlib
import tagpy


def test_tagprinter():
    f = tagpy.FileRef(str(pathlib.Path(__file__).parent.joinpath("la.ogg")))
    t = f.tag()

    print(t.artist)
    print(t.title)
    print(t.album)
    print(t.year)

    t.artist = "Andreas"
    t.title = "Laaa-ahh"
    t.album = "Shake what'cha got"
    t.year = 2006
    f.save()