def test_preset_index_with_all_presets_filled(self): p = PresetIndex() p.count = 64 p.indexes = [num for num in range(0, 64)] # Should have 64 presets self.assertEqual(64, p.number_of_presets) # And no free slots self.assertIsNone(p.first_empty_index_position)
def test_preset_indexes_are_swapped_ok(self): p = PresetIndex() p.count = 4 p.indexes = [0, 1, 2, 3, 255] p.swap(0, 3) self.assertEqual([3, 1, 2, 0, 255], p.indexes)