Add log analyze for each test

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
Andrey Berezin 2022-11-17 16:38:45 +03:00 committed by abereziny
parent 3e5a204d19
commit bdbcee4e81
3 changed files with 71 additions and 27 deletions

View file

@ -164,3 +164,15 @@ def get_file_content(
content = file.read()
return content
def sanitize_for_file_name(string: str) -> str:
"""
Returns string with only alpha num string with all other characters replaced by '_'
which is valid string to use as file name
Args:
string: string to sanitize
"""
return "".join(character if character.isalnum() else "_" for character in string).strip("_")