Unit test showing pure Python vs C code difference in PWM code.

Based on an example from Marco Galardini on the mailing list.
Consistent handling of mixed case in both C and Python PWM code