update tests to fit nan and Infinity