import tensorflow as tf

        " event_shape=()"
        " dtype=float32>")

    # There's no notion of partially known shapes in eager mode, so exit
    # early.
    if tf.executing_eagerly():
      return

    exp = tfd.Exponential(rate=tf.placeholder_with_default(
        input=1., shape=None))
    self.assertEqual(
        repr(exp),
        "<tfp.distributions.Exponential"
        " 'Exponential/'"
        " batch_shape=<unknown>"
        " event_shape=()"
