memif: add python3 support to test