Update setup.py and fix measurement round trip tests