testing pwm in python