@@ -440,53 +440,53 @@ def test_init(self):
440
440
os .remove (tempcopy )
441
441
442
442
443
- class MixerMusicEndEventTest (unittest .TestCase ):
444
- def setUp (self ):
445
- pygame .display .init ()
446
- pygame .display .set_mode ((40 , 40 ))
447
- if pygame .mixer .get_init () is None :
448
- pygame .mixer .init ()
449
-
450
- def tearDown (self ):
451
- pygame .display .quit ()
452
- pygame .mixer .quit ()
453
-
454
- def test_get_endevent (self ):
455
- # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_endevent:
456
-
457
- # Returns the event type to be sent every time the music finishes
458
- # playback. If there is no endevent the function returns
459
- # pygame.NOEVENT.
460
- #
461
- filename = example_path (os .path .join ("data" , "car_door.wav" ))
462
- pygame .mixer .music .load (filename )
463
- pygame .mixer .music .play ()
464
- no_event = pygame .mixer_music .get_endevent ()
465
- self .assertEqual (pygame .NOEVENT , no_event )
466
-
467
- event_type = pygame .USEREVENT
468
- pygame .mixer_music .set_endevent (event_type )
469
- end_event = pygame .mixer_music .get_endevent ()
470
- self .assertEqual (event_type , end_event )
471
-
472
- def test_set_endevent (self ):
473
- # __doc__ (as of 2008-08-02) for pygame.mixer_music.set_endevent:
474
-
475
- # This causes Pygame to signal (by means of the event queue) when the
476
- # music is done playing. The argument determines the type of event
477
- # that will be queued.
478
- #
479
- # The event will be queued every time the music finishes, not just the
480
- # first time. To stop the event from being queued, call this method
481
- # with no argument.
482
- #
483
- filename = example_path (os .path .join ("data" , "house_lo.wav" ))
484
- pygame .mixer .music .load (filename )
485
- pygame .mixer .music .play ()
486
- event_type = pygame .USEREVENT
487
- pygame .mixer_music .set_endevent (event_type )
488
- end_event = pygame .mixer_music .get_endevent ()
489
- self .assertEqual (event_type , end_event )
443
+ # class MixerMusicEndEventTest(unittest.TestCase):
444
+ # def setUp(self):
445
+ # pygame.display.init()
446
+ # pygame.display.set_mode((40, 40))
447
+ # if pygame.mixer.get_init() is None:
448
+ # pygame.mixer.init()
449
+
450
+ # def tearDown(self):
451
+ # pygame.display.quit()
452
+ # pygame.mixer.quit()
453
+
454
+ # def test_get_endevent(self):
455
+ # # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_endevent:
456
+
457
+ # # Returns the event type to be sent every time the music finishes
458
+ # # playback. If there is no endevent the function returns
459
+ # # pygame.NOEVENT.
460
+ # #
461
+ # filename = example_path(os.path.join("data", "car_door.wav"))
462
+ # pygame.mixer.music.load(filename)
463
+ # pygame.mixer.music.play()
464
+ # no_event = pygame.mixer_music.get_endevent()
465
+ # self.assertEqual(pygame.NOEVENT, no_event)
466
+
467
+ # event_type = pygame.USEREVENT
468
+ # pygame.mixer_music.set_endevent(event_type)
469
+ # end_event = pygame.mixer_music.get_endevent()
470
+ # self.assertEqual(event_type, end_event)
471
+
472
+ # def test_set_endevent(self):
473
+ # # __doc__ (as of 2008-08-02) for pygame.mixer_music.set_endevent:
474
+
475
+ # # This causes Pygame to signal (by means of the event queue) when the
476
+ # # music is done playing. The argument determines the type of event
477
+ # # that will be queued.
478
+ # #
479
+ # # The event will be queued every time the music finishes, not just the
480
+ # # first time. To stop the event from being queued, call this method
481
+ # # with no argument.
482
+ # #
483
+ # filename = example_path(os.path.join("data", "house_lo.wav"))
484
+ # pygame.mixer.music.load(filename)
485
+ # pygame.mixer.music.play()
486
+ # event_type = pygame.USEREVENT
487
+ # pygame.mixer_music.set_endevent(event_type)
488
+ # end_event = pygame.mixer_music.get_endevent()
489
+ # self.assertEqual(event_type, end_event)
490
490
491
491
492
492
if __name__ == "__main__" :
0 commit comments