File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -477,13 +477,22 @@ def test_audio_channels(self):
477477 assert stream_info ["channels" ] == 2
478478
479479 def test_replaygain (self ):
480- for file in [
480+ REPLAYGAIN_FILES = [
481481 "tests/test.mp4" ,
482482 "tests/test.mp3" ,
483483 "tests/test.ogg" ,
484484 "tests/test.opus" ,
485- ]:
486- original_mtime = os .path .getmtime (file )
487- ffmpeg_normalize_call ([file , "--replaygain" ])
488- assert os .path .isfile (file )
489- assert os .path .getmtime (file ) > original_mtime
485+ ]
486+ try :
487+ for file in REPLAYGAIN_FILES :
488+ original_mtime = os .path .getmtime (file )
489+ ffmpeg_normalize_call ([file , "--replaygain" ])
490+ assert os .path .isfile (file )
491+ assert os .path .getmtime (file ) > original_mtime
492+ except AssertionError :
493+ print (f"Failed to normalize { file } " )
494+ raise
495+ finally :
496+ # git checkout the files!
497+ for file in REPLAYGAIN_FILES :
498+ subprocess .run (["git" , "checkout" , file ], check = False )
You can’t perform that action at this time.
0 commit comments