Skip to content

Commit

Permalink
test: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Sep 24, 2024
1 parent 7df5351 commit 6b20861
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/gui/shared/scripts/bdd_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,12 @@ def save_screenrecord(filename):
)
if not os.path.exists(screenrecords_dir):
os.makedirs(screenrecords_dir)
# reverse the list to get the latest video first
video_files.reverse()
for idx, video in enumerate(video_files):
if idx:
file_parts = filename.rsplit(".", 1)
filename = f"{file_parts[0]}_{idx+1}.{file_parts[1]}"
filename = f"{file_parts[0]}_{idx}.{file_parts[1]}"
shutil.move(video, os.path.join(screenrecords_dir, filename))

shutil.rmtree(prefix_path_namespace(video_dir))
Expand Down

0 comments on commit 6b20861

Please sign in to comment.