def test_eval_nan(): s = T.reprLRData(float('nan')) n = T.evalLRData(s) assert math.isnan(n) s2 = T.reprLRData((float('nan'), 'this is a test')) n2, _ = T.evalLRData(s2) assert math.isnan(n2)
def test_eval_negative_infinity(): s = T.reprLRData(float('-inf')) n = T.evalLRData(s) assert math.isinf(n) assert n < 0 s2 = T.reprLRData((float('-inf'), 'this is a test')) n2, _ = T.evalLRData(s2) assert math.isinf(n2) assert n2 < 0
def test_eval_positive_infinity(): s = T.reprLRData(float('inf')) n = T.evalLRData(s) assert math.isinf(n) assert n > 0 s2 = T.reprLRData((float('inf'), 'this is a test')) n2, _ = T.evalLRData(s2) assert math.isinf(n2) assert n2 > 0