mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
changed beets.tag to beets.mediafile
--HG-- rename : beets/tag.py => beets/mediafile.py extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4050
This commit is contained in:
parent
9b11eeb722
commit
526b65a9c3
5 changed files with 6 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import sqlite3, os, sys, operator, re, shutil
|
||||
from beets.tag import MediaFile, FileTypeError
|
||||
from beets.mediafile import MediaFile, FileTypeError
|
||||
from string import Template
|
||||
|
||||
# Fields in the "items" table; all the metadata available for items in the
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
import unittest
|
||||
|
||||
test_modules = ['tag', 'library']
|
||||
test_modules = ['test_mediafile', 'test_library']
|
||||
|
||||
def suite():
|
||||
s = unittest.TestSuite()
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
import unittest, sys, os, shutil
|
||||
sys.path.append('..')
|
||||
import beets.tag
|
||||
import beets.mediafile
|
||||
|
||||
def MakeReadingTest(path, correct_dict, field):
|
||||
class ReadingTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.f = beets.tag.MediaFile(path)
|
||||
self.f = beets.mediafile.MediaFile(path)
|
||||
def runTest(self):
|
||||
got = getattr(self.f, field)
|
||||
correct = correct_dict[field]
|
||||
|
|
@ -37,12 +37,12 @@ def MakeWritingTest(path, correct_dict, field, testsuffix='_test'):
|
|||
|
||||
def runTest(self):
|
||||
# write new tag
|
||||
a = beets.tag.MediaFile(self.tpath)
|
||||
a = beets.mediafile.MediaFile(self.tpath)
|
||||
setattr(a, field, self.value)
|
||||
a.save_tags()
|
||||
|
||||
# verify ALL tags are correct with modification
|
||||
b = beets.tag.MediaFile(self.tpath)
|
||||
b = beets.mediafile.MediaFile(self.tpath)
|
||||
for readfield in correct_dict.keys():
|
||||
got = getattr(b, readfield)
|
||||
if readfield is field:
|
||||
Loading…
Reference in a new issue