Update Python tests to resolve stricter SWIG type checks.