

def test_to_i(self, space):
    w_res = space.execute('return [1.1.to_i, 1.1.to_int]')
    assert (self.unwrap(space, w_res) == [1, 1])
    with self.raises(space, 'FloatDomainError', 'NaN'):
        space.execute('(0.0 / 0.0).to_i')
    with self.raises(space, 'FloatDomainError', 'Infinity'):
        space.execute('(1.0 / 0.0).to_i')
    with self.raises(space, 'FloatDomainError', '-Infinity'):
        space.execute('(-1.0 / 0.0).to_i')

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