コード例 #1
0
class MeterTests(TestCase):

    def setUp(self):
        self.meterStandard = Meter(4,4) 
        self.meter34 = Meter(3,4)
        self.meter54 = Meter(5,4)
        self.meter98 = Meter(9,8) 

    def test_beat(self):
        beats = []
        for i in range(96 * 2):
            beats.append(self.meterStandard.beat(i))
        self.assertEquals(beats, data.measure_standard_beats)
       
        beats = []
        for i in range(96 * 2):
            beats.append(self.meter34.beat(i)) 
        self.assertEquals(beats, data.measure_34_beats)

        beats = []
        for i in range(96 * 2):
            beats.append(self.meter54.beat(i))
        self.assertEquals(beats, data.measure_54_beats)
        
        beats = []
        for i in range(96 * 2):
            beats.append(self.meter98.beat(i))
        self.assertEquals(beats, data.measure_98_beats)
コード例 #2
0
 def setUp(self):
     self.meterStandard = Meter(4,4) 
     self.meter34 = Meter(3,4)
     self.meter54 = Meter(5,4)
     self.meter98 = Meter(9,8)