def test_fix_nan_converts_nan_to_positive_infinity_with_NANLAST(): assert _fix_nan((float('nan'),), ns.NANLAST) == (float('+inf'),) assert _fix_nan(('a', 'b', float('nan')), ns.NANLAST) == ('a', 'b', float('+inf'))
def test_fix_nan_converts_nan_to_positive_infinity_with_NANLAST(): assert _fix_nan((float('nan'), ), ns.NANLAST) == (float('+inf'), ) assert _fix_nan(('a', 'b', float('nan')), ns.NANLAST) == ('a', 'b', float('+inf'))
def test_fix_nan_converts_nan_to_negative_infinity_without_NANLAST(): assert _fix_nan((float('nan'),), 0) == (float('-inf'),) assert _fix_nan(('a', 'b', float('nan')), 0) == ('a', 'b', float('-inf'))
def test_fix_nan_converts_nan_to_negative_infinity_without_NANLAST(): assert _fix_nan((float('nan'), ), 0) == (float('-inf'), ) assert _fix_nan(('a', 'b', float('nan')), 0) == ('a', 'b', float('-inf'))