def testIncompatibleLength(self):
    """Tests error when variable lists have unequal length."""
    with self.test_session():
      target_variables = [tf.Variable(tf.random_normal(shape=[1, 2]))]
      source_variables = [
          tf.Variable(tf.random_normal(shape=[1, 2])),
          tf.Variable(tf.random_normal(shape=[3, 4])),
      ]
      self.assertRaises(ValueError, target_update_ops.update_target_variables,
                        target_variables, source_variables)
Tests error when variable lists have unequal length.
trfl/target_update_ops_test.py