Skip to content

Commit 9cb25ba

Browse files
committed
Include full test names in operation test exceptions.
1 parent dacf433 commit 9cb25ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_operations.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def jsontest_function(self, test_name, test_data):
112112
):
113113
return
114114

115+
op_test_name = '{0}/{1}.json'.format(arg, test_name)
116+
115117
# Create a host with this tests facts and attach to pseudo host
116118
host = create_host(facts=test_data.get('facts', {}))
117119

@@ -162,7 +164,7 @@ def jsontest_function(self, test_name, test_data):
162164
warnings.warn((
163165
'This operation should be idempotent, but the test has disabled'
164166
' this check without reason: {0}'
165-
).format(test_name))
167+
).format(op_test_name))
166168

167169
commands = parse_commands(output_commands)
168170
assert_commands(commands, test_data['commands'])
@@ -180,7 +182,7 @@ def jsontest_function(self, test_name, test_data):
180182
else:
181183
assert host.noop_description is not None, 'no noop description was set'
182184
warnings.warn('No noop_description set for test: {0} (got "{1}")'.format(
183-
test_name, host.noop_description,
185+
op_test_name, host.noop_description,
184186
))
185187

186188
return TestTests

0 commit comments

Comments
 (0)