@@ -95,18 +95,12 @@ def test_model(self):
95
95
# Exception is thrown when model does not have __call__ attribute
96
96
with self .assertRaises (Exception ) as context :
97
97
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 )
105
99
self .assertTrue (context .exception )
106
100
107
101
def test_sess (self ):
108
102
# 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 )
110
104
111
105
def test_sess_generate_np (self ):
112
106
model = Model ('model' , 10 , {})
@@ -115,7 +109,7 @@ class DummyAttack(Attack):
115
109
def generate (self , x , ** kwargs ):
116
110
return x
117
111
118
- attack = DummyAttack (model , back = 'tf' , sess = None )
112
+ attack = DummyAttack (model , sess = None )
119
113
with self .assertRaises (Exception ) as context :
120
114
attack .generate_np (0. )
121
115
self .assertTrue (context .exception )
@@ -125,7 +119,7 @@ class TestParseParams(CleverHansTest):
125
119
def test_parse (self ):
126
120
sess = tf .Session ()
127
121
128
- test_attack = Attack (Model ('model' , 10 , {}), back = 'tf' , sess = sess )
122
+ test_attack = Attack (Model ('model' , 10 , {}), sess = sess )
129
123
self .assertTrue (test_attack .parse_params ({}))
130
124
131
125
0 commit comments