1414from platform import python_implementation , system
1515from sys import stdout
1616from unittest import skipIf , TestCase
17- from unittest .mock import patch , Mock
17+ from unittest .mock import patch
1818
1919from tinytag import ParseError , TinyTagException , UnsupportedFormatError
2020from tinytag import Images , OtherFields , TinyTag
@@ -1791,6 +1791,7 @@ def test_mp4_xmp_invalid_track(self) -> None:
17911791
17921792 def test_mp4_parse_xmp_metadata_empty (self ) -> None :
17931793 # Test _parse_xmp_metadata with empty/None input
1794+ # pylint: disable=protected-access
17941795 result = _MP4 ._parse_xmp_metadata (b'' )
17951796 self .assertEqual (result , {})
17961797 result = _MP4 ._parse_xmp_metadata (None )
@@ -1799,15 +1800,16 @@ def test_mp4_parse_xmp_metadata_empty(self) -> None:
17991800 def test_mp4_parse_xmp_metadata_exception (self ) -> None :
18001801 # Test _parse_xmp_metadata with data that causes exception
18011802 # Passing wrong type (str instead of bytes) triggers exception
1803+ # pylint: disable=protected-access
18021804 result = _MP4 ._parse_xmp_metadata ('not bytes' ) # type: ignore
18031805 # Should return empty dict on exception
18041806 self .assertEqual (result , {})
18051807
1806- def test_mp4_xmp_set_field_exception (self ) -> None :
1808+ @staticmethod
1809+ def test_mp4_xmp_set_field_exception () -> None :
18071810 # Test exception handler in _apply_xmp_metadata_fallback
18081811 # when _set_field raises an exception
1809- tag = TinyTag .get (
1810- os .path .join (SAMPLE_FOLDER , 'mp4_xmp_fallback.m4a' ))
1812+ # pylint: disable=protected-access
18111813 # Create a new MP4 instance to test
18121814 sample_path = os .path .join (SAMPLE_FOLDER , 'mp4_xmp_fallback.m4a' )
18131815 with open (sample_path , 'rb' ) as f :
0 commit comments