

def test_to_s(self, space):
    w_res = space.execute('return 1.5.to_s')
    assert (space.str_w(w_res) == '1.5')
    w_res = space.execute('return (0.0 / 0.0).to_s')
    assert (space.str_w(w_res) == 'NaN')
    w_res = space.execute('return (1.0 / 0.0).to_s')
    assert (space.str_w(w_res) == 'Infinity')
    w_res = space.execute('return (-1.0 / 0.0).to_s')
    assert (space.str_w(w_res) == '-Infinity')

dataset/ETHPy150Open topazproject/topaz/tests/objects/test_floatobject.py TestFloatObject.test_to_s/original