def test_tensorflow_iris(self):
    (classifier, _) = get_tabular_classifier_tf()
    attack = VirtualAdversarialMethod(classifier, eps=0.1)
    with self.assertRaises(TypeError) as context:
        x_test_iris_adv = attack.generate(self.x_test_iris)
    self.assertIn('This attack requires a classifier predicting probabilities in the range [0, 1] as output.Values smaller than 0.0 or larger than 1.0 have been detected.', str(context.exception))
def test_tensorflow_iris(self):
    (classifier, _) = get_tabular_classifier_tf()
    attack = VirtualAdversarialMethod(classifier, eps=0.1)
    with self.assertRaises(TypeError) as context:
        x_test_iris_adv = attack.generate(self.x_test_iris)
    self.assertIn('This attack requires a classifier predicting probabilities in the range [0, 1] as output.Values smaller than 0.0 or larger than 1.0 have been detected.', str(context.exception))