class_docstr: A unittest class for testing the ZOO attack.
class_docstr_tok: ["A","unittest","class","for","testing","the","ZOO","attack","."]
docstr: Test the corner case when attack fails.
  :return:
docstr_tok: ["Test","the","corner","case","when","attack","fails",".",":","return",":"]
code: def test_2_tensorflow_failure_attack(self):
      """
      Test the corner case when attack fails.
      :return:
      """
      x_test_original = self.x_test_mnist.copy()
  
      # Build TensorFlowClassifier
      tfc, sess = get_image_classifier_tf()
  
      # Failure attack
      zoo = ZooAttack(
          classifier=tfc,
          max_iter=0,
          binary_search_steps=0,
          learning_rate=0,
          verbose=False,
      )
      x_test_mnist_adv = zoo.generate(self.x_test_mnist)
      self.assertLessEqual(np.amax(x_test_mnist_adv), 1.0)
      self.assertGreaterEqual(np.amin(x_test_mnist_adv), 0.0)
      np.testing.assert_almost_equal(
          self.x_test_mnist, x_test_mnist_adv, 3
      )
  
      # Check that x_test has not been modified by attack and classifier
      self.assertAlmostEqual(
          float(np.max(np.abs(x_test_original - self.x_test_mnist))),
          0.0,
          delta=0.00001,
      )
  
      # Clean-up session
      if sess is not None:
          sess.close()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import keras.backend
  import numpy
  from art.attacks.evasion.zoo import ZooAttack
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import random_targets
  from tests.utils import TestBase, get_image_classifier_kr, get_image_classifier_pt
  from tests.utils import get_image_classifier_tf, master_seed
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 2 for calling the TestZooAttack obj's underlying member method code with example usage: obj.test_2_tensorflow_failure_attack() without return types