def METHOD_NAME(self):
    err_msg = "Cannot make an Interval directly with non-finite bounds"
    with self.assertRaisesRegex(ValueError, err_msg):
        gpytorch.constraints.Interval(0.0, math.inf)
    with self.assertRaisesRegex(ValueError, err_msg):
        gpytorch.constraints.Interval(-math.inf, 0.0)