docstr: Tests that exceptions are properly raised.
docstr_tok: ["Tests","that","exceptions","are","properly","raised","."]
code: def test_intersection_ray_sphere_exception_raised(self):
      """Tests that exceptions are properly raised."""
      sphere_center = np.random.uniform(size=(3,))
      point_on_ray = np.random.uniform(size=(3,))
      sample_ray = np.random.uniform(size=(3,))
      normalized_sample_ray = sample_ray / np.linalg.norm(
          sample_ray, axis=-1
      )
      positive_sphere_radius = np.random.uniform(
          sys.float_info.epsilon, 1.0, size=(1,)
      )
      negative_sphere_radius = np.random.uniform(-1.0, 0.0, size=(1,))
  
      with self.subTest(name="positive_radius"):
          with self.assertRaises(tf.errors.InvalidArgumentError):
              self.evaluate(
                  ray.intersection_ray_sphere(
                      sphere_center,
                      negative_sphere_radius,
                      normalized_sample_ray,
                      point_on_ray,
                  )
              )
  
      with self.subTest(name="normalized_ray"):
          with self.assertRaises(tf.errors.InvalidArgumentError):
              self.evaluate(
                  ray.intersection_ray_sphere(
                      sphere_center,
                      positive_sphere_radius,
                      sample_ray,
                      point_on_ray,
                  )
              )
  
imports: import sys
  from absl import flags
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.geometry.representation import ray
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 17 for calling the RayTest obj's underlying member method code with example usage: obj.test_intersection_ray_sphere_exception_raised() without return types