Ejemplo n.º 1
0
 def test_get_leaves(self):
     test_dict = {
         'a': ['z', 'y', 'x'],
         'b': ['w', 't'],
         'c': ['elephant'],
         'd': {'asdf': ['z']},
         'e': {'borg': ['foo']}
     }
     actual = multitrack.get_dict_leaves(test_dict)
     expected = set(['z', 'y', 'x', 'w', 't', 'elephant', 'foo'])
     self.assertEqual(actual, expected)
Ejemplo n.º 2
0
 def test_get_leaves2(self):
     mtrack = multitrack.MultiTrack('NightPanther_Fire')
     test_dict = {
         'a': mtrack,
         'b': {1: mtrack, 2: mtrack},
         'c': [mtrack],
         'd': {'asdf': mtrack},
         'e': {'borg': [mtrack]}
     }
     actual = multitrack.get_dict_leaves(test_dict)
     expected = set([mtrack, mtrack, mtrack, mtrack, mtrack])
     self.assertEqual(actual, expected)
Ejemplo n.º 3
0
 def test_raw_length2(self):
     actual = len(multitrack.get_dict_leaves(self.mtrack.raw_audio))
     expected = 55
     self.assertEqual(actual, expected)