Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(260)  |  Call(209)  |  Derive(0)  |  Import(51)

src/m/u/mutagen-1.22/tests/test_id3.py   mutagen(Download)
import os; from os.path import join
import shutil
from tests import TestCase
from tests import add
from mutagen import id3
    def test_tit2_value(self):
        self.failUnlessEqual(self.id3["TIT2"].text, [u"Punk To Funk"])
add(Issue21)
 
class ID3Tags(TestCase):
        os.unlink(self.filename)
 
add(TestWriteID3v1)
 
class TestV22Tags(TestCase):
        self.failUnless(self.tags["TRCK"].text == ["3/11"])
        self.failUnless(self.tags["TPE1"].text == ["Anais Mitchell"])
add(TestV22Tags)
 
def TestReadTags():
 
    testcase = type('TestReadTags', (TestCase,), load_tests)
    add(testcase)
    testcase = type('TestReadReprTags', (TestCase,), repr_tests)
    add(testcase)

src/m/u/mutagen-HEAD/tests/test_id3.py   mutagen(Download)
import os; from os.path import join
import shutil
from unittest import TestCase
from tests import add
from mutagen.id3 import ID3, BitPaddedInt, COMR, Frames, Frames_2_2, ID3Warning
        os.unlink(self.filename)
 
add(TestWriteID3v1)
 
class TestV22Tags(TestCase):
        self.failUnless(self.tags["TRCK"].text == ["3/11"])
        self.failUnless(self.tags["TPE1"].text == ["Anais Mitchell"])
add(TestV22Tags)
 
def TestReadTags():
    testcase = type('TestReadTags', (TestCase,), load_tests)
    testcase.uses_mmap = False
    add(testcase)
    testcase = type('TestReadReprTags', (TestCase,), repr_tests)
    testcase.uses_mmap = False
    add(testcase)

src/m/u/mutagen-1.22/tests/test_flac.py   mutagen(Download)
 
import shutil, os
from tests import TestCase, add
from mutagen.id3 import ID3, TIT2, ID3NoHeaderError
from mutagen.flac import to_int_be, Padding, VCFLACDict, MetadataBlock, error
    def test_long(self):
        self.failUnlessEqual(to_int_be("\x01\x00\x00\x00\x00"), 2**32)
add(Tto_int_be)
 
class TVCFLACDict(TVCommentDict):
    def test_roundtrip_vc(self):
        self.failUnlessEqual(self.c, VComment(self.c.write() + "\x01"))
add(TVCFLACDict)
 
class TMetadataBlock(TestCase):
        self.failUnlessEqual(length1, length2)
        self.failUnlessEqual(len(blocks), 2)
add(TMetadataBlock)
 
class TStreamInfo(TestCase):
    def test_roundtrip(self):
        self.failUnlessEqual(StreamInfo(self.i.write()), self.i)
add(TStreamInfo)
 
class TSeekTable(TestCase):

src/m/u/mutagen-1.22/tests/test_apev2.py   mutagen(Download)
from tempfile import mkstemp
 
from tests import TestCase, add
 
import mutagen.apev2
        for key in ["\x11hi", "ffoo\xFF", u"\u1234", "a", "", "foo" * 100]:
            self.failIf(is_valid_apev2_key(key))
add(Tis_valid_apev2_key)
 
 
        self.failUnlessEqual(len(x.keys()), 17)
 
add(TAPEInvalidItemCount)
 
 
        os.unlink(SAMPLE + ".tag_at_start")
 
add(TAPEWriter)
 
class TAPEv2ThenID3v1Writer(TAPEWriter):
        pass
 
add(TAPEv2ThenID3v1Writer)
 
class TAPEv2(TestCase):

src/m/u/mutagen-1.22/tests/test__id3frames.py   mutagen(Download)
from tests import TestCase, add
 
from mutagen.id3 import Frames, Frames_2_2, ID3
 
_22 = ID3(); _22.version = (2,2,0)
            USER(lang="abc").HashKey, USER(lang="def").HashKey)
 
add(FrameSanityChecks)
 
 
        self.assertEquals(gen.genres, [u"Unknown", u"genre"])
 
add(Genres)
 
 
        self.assert_(u > s > t)
 
add(TimeStamp)
 
 
            TypeError, {}.__setitem__, TIT1(encoding=0, text="foo"), None)
 
add(NoHashFrame)
 
 

src/m/u/mutagen-HEAD/tests/test_flac.py   mutagen(Download)
 
import shutil, os
from tests import TestCase, add
from mutagen.id3 import ID3, TIT2, ID3NoHeaderError
from mutagen.flac import to_int_be, Padding, VCFLACDict, MetadataBlock
    def test_long(self):
        self.failUnlessEqual(to_int_be("\x01\x00\x00\x00\x00"), 2**32)
add(Tto_int_be)
 
class TVCFLACDict(TVCommentDict):
    def test_roundtrip_vc(self):
        self.failUnlessEqual(self.c, VComment(self.c.write() + "\x01"))
add(TVCFLACDict)
 
class TMetadataBlock(TestCase):
        self.failUnlessEqual(length1, length2)
        self.failUnlessEqual(len(blocks), 2)
add(TMetadataBlock)
 
class TStreamInfo(TestCase):
    def test_roundtrip(self):
        self.failUnlessEqual(StreamInfo(self.i.write()), self.i)
add(TStreamInfo)
 
class TSeekTable(TestCase):

src/m/u/mutagen-1.22/tests/test_mp4.py   mutagen(Download)
from cStringIO import StringIO
from tempfile import mkstemp
from tests import TestCase, add
from mutagen.mp4 import MP4, Atom, Atoms, MP4Tags, MP4Info, \
     delete, MP4Cover, MP4MetadataError, MP4FreeForm, error
        self.failUnlessEqual(atom.children[-1].length, 12)
 
add(TAtom)
 
class TAtoms(TestCase):
    def test_repr(self):
        repr(self.atoms)
add(TAtoms)
 
class TMP4Info(TestCase):
        info = MP4Info(atoms, fileobj)
        self.failUnlessEqual(info.length, 8)
add(TMP4Info)
 
class TMP4Tags(TestCase):
        self.failUnlessEqual(v.dataformat, MP4FreeForm.FORMAT_TEXT)
 
add(TMP4Tags)
 
class TMP4(TestCase):

src/m/u/mutagen-1.22/tests/test_asf.py   mutagen(Download)
import os
import shutil
from tempfile import mkstemp
from tests import TestCase, add
from mutagen.asf import ASF, ASFHeaderError, ASFValue, UNICODE, DWORD, QWORD
            os.path.join("tests", "data", "click.mpc"))
 
add(TASFFile)
 
try: sorted
        self.failUnlessEqual(self.wma3.info.channels, 2)
 
add(TASFInfo)
 
class TASF(TestCase):
class TASFTags1(TASF):
    original = os.path.join("tests", "data", "silence-1.wma")
add(TASFTags1)
 
class TASFTags2(TASF):
    original = os.path.join("tests", "data", "silence-2.wma")
add(TASFTags2)

src/m/u/mutagen-HEAD/tests/test_apev2.py   mutagen(Download)
from tempfile import mkstemp
 
from tests import TestCase, add
 
import mutagen.apev2
        for key in ["\x11hi", "ffoo\xFF", u"\u1234", "a", "", "foo" * 100]:
            self.failIf(is_valid_apev2_key(key))
add(Tis_valid_apev2_key)
 
class TAPEWriter(TestCase):
        os.unlink(SAMPLE + ".tag_at_start")
 
add(TAPEWriter)
 
class TAPEv2ThenID3v1Writer(TAPEWriter):
        pass
 
add(TAPEv2ThenID3v1Writer)
 
class TAPEv2(TestCase):
        os.unlink(self.filename)
 
add(TAPEv2)
 
class TAPEv2ThenID3v1(TAPEv2):

src/m/u/mutagen-1.22/tests/test__id3specs.py   mutagen(Download)
import sys
 
from tests import TestCase, add
 
from mutagen.id3 import BitPaddedInt
        self.assertEquals('\xfc\x00', s.write(None, -2.0))
 
add(SpecSanityChecks)
 
 
        self.assertRaises(ValueError, s.validate, None, 1000)
 
add(SpecValidateChecks)
 
 
        self.failUnlessRaises(TypeError, {}.__setitem__, Spec("foo"), None)
 
add(NoHashSpec)
 
 
        self.failUnless(BitPaddedInt.has_valid_padding(0x3f << 16, bits=6))
 
add(BitPaddedIntTest)
 
 

  1 | 2 | 3 | 4 | 5 | 6  Next