Browse Source

_tag_interface.Ogg.set_free_int: added missing return value

Fabian Peter Hammerle 1 month ago
parent
commit
b81db9acb2
2 changed files with 4 additions and 3 deletions
  1. 2 1
      symuid/_tag_interface.py
  2. 2 2
      tests/test_sync.py

+ 2 - 1
symuid/_tag_interface.py

@@ -264,5 +264,6 @@ class Ogg(_MutagenTagInterface):
                     raise ValueError((self.track_path, tag_key, tag_value))
                 yield (tag_key, int(tag_value[0]))
 
-    def set_free_int(self, tag_label: str, data: int) -> None:
+    def set_free_int(self, tag_label: str, data: int) -> typing.Tuple:
         self._mutagen_file[tag_label] = str(data)
+        return (tag_label, self._mutagen_file[tag_label])

+ 2 - 2
tests/test_sync.py

@@ -131,5 +131,5 @@ def test_sync_play_count_callback(tmpdir, tracks_dir_path):
     play_count_added_cb = unittest.mock.MagicMock()
     sync(tmpdir, path_ignore_regex=DUMMY_PATH_IGNORE_REGEX,
          play_count_added_cb=play_count_added_cb)
-    # TODO fix None
-    play_count_added_cb.assert_called_once_with(track_a2, None)
+    play_count_added_cb.assert_called_once_with(
+        track_a2, ('symuid:pcnt:cmus:lib1:0', ['21']))