@@ -205,30 +205,33 @@ def test_cbwr(self):
205
205
'sse4_2' ,
206
206
'avx' ,
207
207
'avx2' ,
208
- 'avx2,strict' ,
209
208
'avx512_mic' ,
210
- 'avx512_mic,strict' ,
211
209
'avx512' ,
212
- 'avx512,strict' ,
213
210
'avx512_mic_e1' ,
214
211
'avx512_e1' ,
212
+ ]
213
+ strict = [
214
+ 'avx2,strict' ,
215
+ 'avx512_mic,strict' ,
216
+ 'avx512,strict' ,
215
217
'avx512_e1,strict' ,
216
218
]
217
219
for branch in branches :
218
- yield self .check_cbwr , branch
220
+ yield self .check_cbwr , branch , 'branch'
221
+ for branch in branches + strict :
222
+ yield self .check_cbwr , branch , 'all'
219
223
220
- def check_cbwr (self , branch ):
224
+ def check_cbwr (self , branch , cnr_const ):
221
225
status = mkl .cbwr_set (branch = branch )
222
226
if status == 'success' :
223
227
expected_value = 'branch_off' if branch == 'off' else branch
224
- actual_value = mkl .cbwr_get (cnr_const = 'all' )
225
- assert_equals (actual_value , expected_value , msg = "Round-trip failure for CNR branch '{}'" .format (branch ))
228
+ actual_value = mkl .cbwr_get (cnr_const = cnr_const )
229
+ assert_equals (actual_value ,
230
+ expected_value ,
231
+ msg = "Round-trip failure for CNR branch '{}', CNR const '{}'" .format (branch , cnr_const ))
226
232
elif status != 'err_unsupported_branch' :
227
233
raise AssertionError (status )
228
234
229
- def test_cbwr_get_all (self ):
230
- mkl .cbwr_get (cnr_const = 'all' )
231
-
232
235
def test_cbwr_get_auto_branch (self ):
233
236
mkl .cbwr_get_auto_branch ()
234
237
0 commit comments