Add tests/switch.py