code: def test_dist_warnings_and_errors(self):
      with pytest.warns(
          FutureWarning,
          match="argument is deprecated and has no effect",
      ):
          rv = pm.Exponential.dist(lam=1, testval=0.5)
      assert not hasattr(rv.tag, "test_value")
  
      with pytest.raises(
          TypeError, match="Unexpected keyword argument `initval`."
      ):
          pm.Normal.dist(1, 2, initval=None)
      pass
  
imports: import cloudpickle
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor.tensor.random.op import RandomVariable
  import pymc
  from pymc.distributions.distribution import moment
  from pymc.initial_point import make_initial_point_fn, make_initial_point_fns_per_chain
label_desc: Use image node_id 1 for calling the TestInitvalAssignment obj's underlying member method code with example usage: obj.test_dist_warnings_and_errors() without return types