Skip to content

Commit fb490ce

Browse files
committed
remove back arg from attacks tests
1 parent b5ebdc2 commit fb490ce

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests_tf/test_attacks.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,12 @@ def test_model(self):
9595
# Exception is thrown when model does not have __call__ attribute
9696
with self.assertRaises(Exception) as context:
9797
model = tf.placeholder(tf.float32, shape=(None, 10))
98-
Attack(model, back='tf', sess=sess)
99-
self.assertTrue(context.exception)
100-
101-
def test_back(self):
102-
# Exception is thrown when back is not tf or th
103-
with self.assertRaises(Exception) as context:
104-
Attack(None, back='test', sess=None)
98+
Attack(model, sess=sess)
10599
self.assertTrue(context.exception)
106100

107101
def test_sess(self):
108102
# Test that it is permitted to provide no session
109-
Attack(Model('model', 10, {}), back='tf', sess=None)
103+
Attack(Model('model', 10, {}), sess=None)
110104

111105
def test_sess_generate_np(self):
112106
model = Model('model', 10, {})
@@ -115,7 +109,7 @@ class DummyAttack(Attack):
115109
def generate(self, x, **kwargs):
116110
return x
117111

118-
attack = DummyAttack(model, back='tf', sess=None)
112+
attack = DummyAttack(model, sess=None)
119113
with self.assertRaises(Exception) as context:
120114
attack.generate_np(0.)
121115
self.assertTrue(context.exception)
@@ -125,7 +119,7 @@ class TestParseParams(CleverHansTest):
125119
def test_parse(self):
126120
sess = tf.Session()
127121

128-
test_attack = Attack(Model('model', 10, {}), back='tf', sess=sess)
122+
test_attack = Attack(Model('model', 10, {}), sess=sess)
129123
self.assertTrue(test_attack.parse_params({}))
130124

131125

0 commit comments

Comments
 (0)