def test_quantizing_on_off(meter): # Default is quantizing on assert meter.is_quantizing() # Can override default meter_2 = Meter(beat_note_dur=BEAT_NOTE_DUR, beats_per_measure=BEATS_PER_MEASURE, quantizing=False) assert not meter_2.is_quantizing() # Can toggle with methods meter_2.quantizing_on() assert meter_2.is_quantizing() meter_2.quantizing_off() assert not meter_2.is_quantizing()
def test_quantizing_on_off(section): # Default is quantizing on for measure in section.measure_list: assert measure.meter.is_quantizing() # Can override default meter_2 = Meter(beat_note_dur=BEAT_DUR, beats_per_measure=BEATS_PER_MEASURE, quantizing=False) assert not meter_2.is_quantizing() # Can toggle with methods meter_2.quantizing_on() assert meter_2.is_quantizing() meter_2.quantizing_off() assert not meter_2.is_quantizing()