File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -676,12 +676,14 @@ def test_replaygain_tags_stripped_after_normalization(self, tmp_path):
676676 mp3 = MP3 (str (temp_input ), ID3 = ID3 )
677677 if not mp3 .tags :
678678 mp3 .add_tags ()
679+ assert mp3 .tags is not None
679680 mp3 .tags .add (TXXX (desc = "REPLAYGAIN_TRACK_GAIN" , text = ["-5.00 dB" ]))
680681 mp3 .tags .add (TXXX (desc = "REPLAYGAIN_TRACK_PEAK" , text = ["0.950000" ]))
681682 mp3 .save ()
682683
683684 # Verify tags were added
684685 mp3_check = MP3 (str (temp_input ), ID3 = ID3 )
686+ assert mp3_check .tags is not None
685687 assert "TXXX:REPLAYGAIN_TRACK_GAIN" in mp3_check .tags
686688 assert "TXXX:REPLAYGAIN_TRACK_PEAK" in mp3_check .tags
687689
@@ -725,12 +727,14 @@ def test_replaygain_tags_stripped_m4a(self, tmp_path):
725727 mp4 = MP4 (str (temp_input ))
726728 if not mp4 .tags :
727729 mp4 .add_tags ()
730+ assert mp4 .tags is not None
728731 mp4 .tags ["----:com.apple.iTunes:REPLAYGAIN_TRACK_GAIN" ] = [b"-5.00 dB" ]
729732 mp4 .tags ["----:com.apple.iTunes:REPLAYGAIN_TRACK_PEAK" ] = [b"0.950000" ]
730733 mp4 .save ()
731734
732735 # Verify tags were added
733736 mp4_check = MP4 (str (temp_input ))
737+ assert mp4_check .tags is not None
734738 assert "----:com.apple.iTunes:REPLAYGAIN_TRACK_GAIN" in mp4_check .tags
735739 assert "----:com.apple.iTunes:REPLAYGAIN_TRACK_PEAK" in mp4_check .tags
736740
You can’t perform that action at this time.
0 commit comments