test: use yaml.safe_dump to avoid dump without tags

safe_dump produces only standard YAML tags and
cannot represent an arbitrary Python object.

Reported-by: Mr Jenkins
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Andrei Vagin 2018-11-04 21:01:25 +03:00
parent 565498a774
commit deef94ce7c

View file

@ -1726,7 +1726,8 @@ class Launcher:
details = {'output': output}
tc.add_error_info(output = output)
print(testline, file=self.__file_report)
print("%s" % yaml.dump(details, explicit_start=True, explicit_end=True, default_style='|'), file=self.__file_report)
print("%s" % yaml.safe_dump(details, explicit_start=True,
explicit_end=True, default_style='|'), file=self.__file_report)
if sub['log']:
add_to_output(sub['log'])
else: