Skip to content

Commit 933617f

Browse files
Changed test for round-trip of CBWR get/set
Using cbwr_get('off'), we should expect the status 'branch_off' be returned per https://software.intel.com/en-us/mkl-developer-reference-c-named-constants-for-cnr-control
1 parent f1d27d9 commit 933617f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_mkl_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ class test_conditional_numerical_reproducibility_control():
196196
def test_cbwr(self):
197197
branches = [
198198
'off',
199-
'branch_off',
200199
'auto',
201200
'compatible',
202201
'sse2',
@@ -220,7 +219,9 @@ def test_cbwr(self):
220219
def check_cbwr(self, branch):
221220
status = mkl.cbwr_set(branch=branch)
222221
if status == 'success':
223-
assert_equals(mkl.cbwr_get(cnr_const='branch'), branch)
222+
expected_value = 'branch_off' if branch == 'off' else branch
223+
actual_value = mkl.cbwr_get(cnr_const='all')
224+
assert_equals(actual_value, expected_value, msg="Round-trip failure for CNR branch '{}'".format(branch))
224225
elif status != 'err_unsupported_branch':
225226
raise AssertionError(status)
226227

0 commit comments

Comments
 (0)