Skip to content

Commit a413f9a

Browse files
committed
Raise an exception when ops test idempotent but the test says otherwise.
1 parent 395d468 commit a413f9a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_operations.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ def jsontest_function(self, test_name, test_data):
160160
'Operation not idempotent, second output commands: {0}'
161161
).format(second_output_commands))
162162
else:
163-
if not test_data.get('disable_itempotent_warning_reason'):
163+
if not second_output_commands:
164+
raise Exception((
165+
'Operation tests as idempotent but test '
166+
'says it is not: {0}'
167+
).format(op_test_name))
168+
if not test_data.get('disable_idempotent_warning_reason'):
164169
warnings.warn((
165170
'This operation should be idempotent, but the test has disabled'
166171
' this check without reason: {0}'

0 commit comments

Comments
 (0)