コード例 #1
0
 def testMusicNetIterator(self):
   iterator = musicnet_io.musicnet_iterator(self.musicnet_example_filename)
   pairs = list(iterator)
   audio, sequence = pairs[0]
   self.assertEqual(1, len(pairs))
   self.assertEqual('test', sequence.filename)
   self.assertEqual('MusicNet', sequence.collection_name)
   self.assertEqual('/id/musicnet/test', sequence.id)
   self.assertEqual(3, len(sequence.notes))
   self.assertEqual(66150, len(audio))
コード例 #2
0
 def testMusicNetIterator(self):
     iterator = musicnet_io.musicnet_iterator(
         self.musicnet_example_filename)
     pairs = list(iterator)
     audio, sequence = pairs[0]
     self.assertEqual(1, len(pairs))
     self.assertEqual('test', sequence.filename)
     self.assertEqual('MusicNet', sequence.collection_name)
     self.assertEqual(
         '/id/musicnet/MusicNet/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',
         sequence.id)
     self.assertEqual(3, len(sequence.notes))
     self.assertEqual(66150, len(audio))