File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -146,13 +146,17 @@ def run_scenario(self):
146
146
converted_args = dict ((camel_to_snake (c ), v )
147
147
for c , v in args .items ())
148
148
149
+ expect_error = test ['assert' ].get ("error" , False )
150
+ result = None
149
151
error = None
150
152
try :
151
153
result = operation (** converted_args )
152
154
153
155
if 'download' in test ['act' ]['operation' ]:
154
156
result = Binary (result .read ())
155
157
except Exception as exc :
158
+ if not expect_error :
159
+ raise
156
160
error = exc
157
161
158
162
self .init_expected_db (test , result )
@@ -164,7 +168,7 @@ def run_scenario(self):
164
168
"ChunkIsWrongSize" : CorruptGridFile ,
165
169
"RevisionNotFound" : NoFile }
166
170
167
- if test [ 'assert' ]. get ( "error" , False ) :
171
+ if expect_error :
168
172
self .assertIsNotNone (error )
169
173
self .assertIsInstance (error , errors [test ['assert' ]['error' ]],
170
174
test ['description' ])
You can’t perform that action at this time.
0 commit comments