3232
3333# pylint: disable=invalid-name
3434class Test_MIDIMessage_from_message_byte_tests (unittest .TestCase ):
35- # pylint: enable=invalid-name
3635 def test_NoteOn_basic (self ): # pylint: disable=invalid-name
37- # pylint: enable=invalid-name
3836 data = bytes ([0x90 , 0x30 , 0x7F ])
3937 ichannel = 0
4038
@@ -50,7 +48,6 @@ def test_NoteOn_basic(self): # pylint: disable=invalid-name
5048 self .assertEqual (msg .channel , 0 )
5149
5250 def test_NoteOn_awaitingthirdbyte (self ): # pylint: disable=invalid-name
53- # pylint: enable=invalid-name
5451 data = bytes ([0x90 , 0x30 ])
5552 ichannel = 0
5653
@@ -71,7 +68,6 @@ def test_NoteOn_awaitingthirdbyte(self): # pylint: disable=invalid-name
7168 self .assertEqual (skipped , 0 )
7269
7370 def test_NoteOn_predatajunk (self ): # pylint: disable=invalid-name
74- # pylint: enable=invalid-name
7571 data = bytes ([0x20 , 0x64 , 0x90 , 0x30 , 0x32 ])
7672 ichannel = 0
7773
@@ -91,7 +87,6 @@ def test_NoteOn_predatajunk(self): # pylint: disable=invalid-name
9187 self .assertEqual (msg .channel , 0 )
9288
9389 def test_NoteOn_prepartialsysex (self ): # pylint: disable=invalid-name
94- # pylint: enable=invalid-name
9590 data = bytes ([0x01 , 0x02 , 0x03 , 0x04 , 0xF7 , 0x90 , 0x30 , 0x32 ])
9691 ichannel = 0
9792
@@ -128,7 +123,6 @@ def test_NoteOn_prepartialsysex(self): # pylint: disable=invalid-name
128123 self .assertEqual (msg .channel , 0 )
129124
130125 def test_NoteOn_postNoteOn (self ): # pylint: disable=invalid-name
131- # pylint: enable=invalid-name
132126 data = bytes ([0x90 | 0x08 , 0x30 , 0x7F , 0x90 | 0x08 , 0x37 , 0x64 ])
133127 ichannel = 8
134128
@@ -144,7 +138,6 @@ def test_NoteOn_postNoteOn(self): # pylint: disable=invalid-name
144138 self .assertEqual (msg .channel , 8 )
145139
146140 def test_NoteOn_postpartialNoteOn (self ): # pylint: disable=invalid-name
147- # pylint: enable=invalid-name
148141 data = bytes ([0x90 , 0x30 , 0x7F , 0x90 , 0x37 ])
149142 ichannel = 0
150143
@@ -160,7 +153,6 @@ def test_NoteOn_postpartialNoteOn(self): # pylint: disable=invalid-name
160153 self .assertEqual (msg .channel , 0 )
161154
162155 def test_NoteOn_preotherchannel (self ): # pylint: disable=invalid-name
163- # pylint: enable=invalid-name
164156 data = bytes ([0x90 | 0x05 , 0x30 , 0x7F , 0x90 | 0x03 , 0x37 , 0x64 ])
165157 ichannel = 3
166158
@@ -175,10 +167,9 @@ def test_NoteOn_preotherchannel(self): # pylint: disable=invalid-name
175167 self .assertEqual (skipped , 0 )
176168 self .assertEqual (msg .channel , 3 )
177169
178- def test_NoteOn_preotherchannelplusintermediatejunk (
170+ def test_NoteOn_preotherchannelplusintermediatejunk ( # pylint: disable=invalid-name
179171 self ,
180- ): # pylint: disable=invalid-name
181- # pylint: enable=invalid-name
172+ ):
182173 data = bytes ([0x90 | 0x05 , 0x30 , 0x7F , 0x00 , 0x00 , 0x90 | 0x03 , 0x37 , 0x64 ])
183174 ichannel = 3
184175
@@ -196,7 +187,6 @@ def test_NoteOn_preotherchannelplusintermediatejunk(
196187 self .assertEqual (msg .channel , 3 )
197188
198189 def test_NoteOn_wrongchannel (self ): # pylint: disable=invalid-name
199- # pylint: enable=invalid-name
200190 data = bytes ([0x95 , 0x30 , 0x7F ])
201191 ichannel = 3
202192
@@ -209,7 +199,6 @@ def test_NoteOn_wrongchannel(self): # pylint: disable=invalid-name
209199 self .assertEqual (skipped , 0 )
210200
211201 def test_NoteOn_partialandpreotherchannel1 (self ): # pylint: disable=invalid-name
212- # pylint: enable=invalid-name
213202 data = bytes ([0x95 , 0x30 , 0x7F , 0x93 ])
214203 ichannel = 3
215204
@@ -224,7 +213,6 @@ def test_NoteOn_partialandpreotherchannel1(self): # pylint: disable=invalid-nam
224213 self .assertEqual (skipped , 0 )
225214
226215 def test_NoteOn_partialandpreotherchannel2 (self ): # pylint: disable=invalid-name
227- # pylint: enable=invalid-name
228216 data = bytes ([0x95 , 0x30 , 0x7F , 0x93 , 0x37 ])
229217 ichannel = 3
230218
@@ -239,7 +227,6 @@ def test_NoteOn_partialandpreotherchannel2(self): # pylint: disable=invalid-nam
239227 self .assertEqual (skipped , 0 )
240228
241229 def test_NoteOn_constructor_int (self ): # pylint: disable=invalid-name
242- # pylint: enable=invalid-name
243230 object1 = NoteOn (60 , 0x7F )
244231
245232 self .assertEqual (object1 .note , 60 )
@@ -265,7 +252,6 @@ def test_NoteOn_constructor_int(self): # pylint: disable=invalid-name
265252 self .assertIsNone (object4 .channel )
266253
267254 def test_SystemExclusive_NoteOn (self ): # pylint: disable=invalid-name
268- # pylint: enable=invalid-name
269255 data = bytes ([0xF0 , 0x42 , 0x01 , 0x02 , 0x03 , 0x04 , 0xF7 , 0x90 | 14 , 0x30 , 0x60 ])
270256 ichannel = 14
271257
@@ -293,10 +279,9 @@ def test_SystemExclusive_NoteOn(self): # pylint: disable=invalid-name
293279 self .assertEqual (skipped , 0 )
294280 self .assertEqual (msg .channel , 14 )
295281
296- def test_SystemExclusive_NoteOn_premalterminatedsysex (
282+ def test_SystemExclusive_NoteOn_premalterminatedsysex ( # pylint: disable=invalid-name
297283 self ,
298- ): # pylint: disable=invalid-name
299- # pylint: enable=invalid-name
284+ ):
300285 data = bytes ([0xF0 , 0x42 , 0x01 , 0x02 , 0x03 , 0x04 , 0xF0 , 0x90 , 0x30 , 0x32 ])
301286 ichannel = 0
302287
@@ -312,7 +297,6 @@ def test_SystemExclusive_NoteOn_premalterminatedsysex(
312297 )
313298
314299 def test_Unknown_SinglebyteStatus (self ): # pylint: disable=invalid-name
315- # pylint: enable=invalid-name
316300 data = bytes ([0xFD ])
317301 ichannel = 0
318302
@@ -326,7 +310,6 @@ def test_Unknown_SinglebyteStatus(self): # pylint: disable=invalid-name
326310 self .assertIsNone (msg .channel )
327311
328312 def test_Empty (self ): # pylint: disable=invalid-name
329- # pylint: enable=invalid-name
330313 data = bytes ([])
331314 ichannel = 0
332315
@@ -343,7 +326,6 @@ class Test_MIDIMessage_NoteOn_constructor(
343326 unittest .TestCase
344327): # pylint: disable=invalid-name
345328 def test_NoteOn_constructor_string (self ): # pylint: disable=invalid-name
346- # pylint: enable=invalid-name
347329 object1 = NoteOn ("C4" , 0x64 )
348330 self .assertEqual (object1 .note , 60 )
349331 self .assertEqual (object1 .velocity , 0x64 )
@@ -369,7 +351,6 @@ def test_NoteOn_constructor_valueerror3(self): # pylint: disable=invalid-name
369351 NoteOn (128 , 0x7F )
370352
371353 def test_NoteOn_constructor_upperrange1 (self ): # pylint: disable=invalid-name
372- # pylint: enable=invalid-name
373354 object1 = NoteOn ("G9" , 0x7F )
374355 self .assertEqual (object1 .note , 127 )
375356 self .assertEqual (object1 .velocity , 0x7F )
@@ -383,12 +364,11 @@ def test_NoteOn_constructor_bogusstring(self): # pylint: disable=invalid-name
383364 NoteOn ("CC4" , 0x7F )
384365
385366
386- class Test_MIDIMessage_NoteOff_constructor (
367+ class Test_MIDIMessage_NoteOff_constructor ( # pylint: disable=invalid-name
387368 unittest .TestCase
388- ): # pylint: disable=invalid-name
369+ ):
389370 # mostly cut and paste from NoteOn above
390371 def test_NoteOff_constructor_string (self ): # pylint: disable=invalid-name
391- # pylint: enable=invalid-name
392372 object1 = NoteOff ("C4" , 0x64 )
393373 self .assertEqual (object1 .note , 60 )
394374 self .assertEqual (object1 .velocity , 0x64 )
@@ -418,7 +398,6 @@ def test_NoteOff_constructor_valueerror3(self): # pylint: disable=invalid-name
418398 NoteOff (128 , 0x7F )
419399
420400 def test_NoteOff_constructor_upperrange1 (self ): # pylint: disable=invalid-name
421- # pylint: enable=invalid-name
422401 object1 = NoteOff ("G9" , 0x7F )
423402 self .assertEqual (object1 .note , 127 )
424403 self .assertEqual (object1 .velocity , 0x7F )
0 commit comments