docstr: Tests the claimed error is raised for piecewise params.
docstr_tok: ["Tests","the","claimed","error","is","raised","for","piecewise","params","."]
code: def test_expected_var_raises_on_piecewise_params(self):
      """Tests the claimed error is raised for piecewise params."""
      dtype = tf.float64
      mean_reversion = tff.math.piecewise.PiecewiseConstantFunc(
          jump_locations=[0.5], values=[1, 1.1], dtype=dtype
      )
      theta = tff.math.piecewise.PiecewiseConstantFunc(
          jump_locations=[0.5], values=[1, 0.9], dtype=dtype
      )
      volvol = tff.math.piecewise.PiecewiseConstantFunc(
          jump_locations=[0.3], values=[0.1, 0.2], dtype=dtype
      )
      rho = tff.math.piecewise.PiecewiseConstantFunc(
          jump_locations=[0.5], values=[0.4, 0.6], dtype=dtype
      )
      process = HestonModel(
          mean_reversion=mean_reversion,
          theta=theta,
          volvol=volvol,
          rho=rho,
          dtype=dtype,
      )
      with self.assertRaises(ValueError):
          process.expected_total_variance(1.0, 1.0)
  
file_path: tf-quant-finance/tf_quant_finance/models/heston/heston_model_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 6 for calling the HestonModelTest obj's underlying member method code with example usage: obj.test_expected_var_raises_on_piecewise_params() without return types