Exemple #1
0
    def setUp(self):
        self.toc1 = toc.TocFile(
            os.path.join(os.path.dirname(__file__), u'capital.1.toc'))
        self.toc1.parse()
        self.assertEquals(len(self.toc1.table.tracks), 11)
        self.failUnless(self.toc1.table.tracks[-1].audio)

        self.toc2 = toc.TocFile(
            os.path.join(os.path.dirname(__file__), u'capital.2.toc'))
        self.toc2.parse()
        self.assertEquals(len(self.toc2.table.tracks), 1)
        self.failIf(self.toc2.table.tracks[-1].audio)

        self.table = copy.deepcopy(self.toc1.table)
        self.table.merge(self.toc2.table)
Exemple #2
0
 def setUp(self):
     self.path = os.path.join(os.path.dirname(__file__), u'ladyhawke.toc')
     self.toc = toc.TocFile(self.path)
     self.toc.parse()
     self.assertEquals(len(self.toc.table.tracks), 13)
     #import code; code.interact(local=locals())
     self.failIf(self.toc.table.tracks[-1].audio)
Exemple #3
0
 def setUp(self):
     # we copy the normal non-utf8 filename to a utf-8 filename
     # in this test because builds with LANG=C fail if we include
     # utf-8 filenames in the dist
     path = u'Jos\xe9Gonz\xe1lez.toc'
     self._performer = u'Jos\xe9 Gonz\xe1lez'
     source = os.path.join(os.path.dirname(__file__), 'jose.toc')
     (fd, self.dest) = tempfile.mkstemp(suffix=path)
     os.close(fd)
     shutil.copy(source, self.dest)
     self.toc = toc.TocFile(self.dest)
     self.toc.parse()
     self.assertEquals(len(self.toc.table.tracks), 10)
Exemple #4
0
 def setUp(self):
     self.path = os.path.join(os.path.dirname(__file__), u'surferrosa.toc')
     self.toc = toc.TocFile(self.path)
     self.toc.parse()
     self.assertEquals(len(self.toc.table.tracks), 21)
Exemple #5
0
 def setUp(self):
     self.path = os.path.join(os.path.dirname(__file__),
                              u'strokes-someday.toc')
     self.toc = toc.TocFile(self.path)
     self.toc.parse()
     self.assertEquals(len(self.toc.table.tracks), 1)
Exemple #6
0
 def setUp(self):
     self.path = os.path.join(os.path.dirname(__file__), u'totbl.fast.toc')
     self.toc = toc.TocFile(self.path)
     self.toc.parse()
     self.assertEquals(len(self.toc.table.tracks), 11)
 def setUp(self):
     self.path = os.path.join(os.path.dirname(__file__), 'ladyhawke.toc')
     self.toc = toc.TocFile(self.path)
     self.toc.parse()
     self.assertEqual(len(self.toc.table.tracks), 13)
     self.assertFalse(self.toc.table.tracks[-1].audio)
 def setUp(self):
     self.path = os.path.join(os.path.dirname(__file__), 'breeders.toc')
     self.toc = toc.TocFile(self.path)
     self.toc.parse()
     self.assertEqual(len(self.toc.table.tracks), 13)