<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import time <EOL> from pyglet import media <EOL> from pyglet . media import procedural <EOL> class TEST_CASE ( unittest . TestCase ) : <EOL> def test_method ( self ) : <EOL> source = procedural . WhiteNoise ( <NUM_LIT:0.5> ) <EOL> player = media . Player ( ) <EOL> player . queue ( source ) <EOL> player . play ( ) <EOL> start_time = time . time ( ) <EOL> stage = <NUM_LIT:0> <EOL> while player . source : <EOL> if stage == <NUM_LIT:0> and time . time ( ) - start_time > <NUM_LIT> : <EOL> player . pause ( ) <EOL> stage = <NUM_LIT:1> <EOL> if stage == <NUM_LIT:1> and time . time ( ) - start_time > <NUM_LIT> : <EOL> player . play ( ) <EOL> stage = <NUM_LIT:2> <EOL> player . dispatch_events ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
