def write_playlist_and_compare(self, itunes_library_input: Path, expected_playlist_xml: Path):
target_path = self.target_folder.joinpath(expected_playlist_xml.name)
itunes_library_path = str(itunes_library_input)
playlists = itunes_library_reader.read_playlists(itunes_library_path)
rhythmbox_playlists_writer.write(playlists=playlists,
target_path=target_path,
source_library_root="D:/Music/",
target_library_root="/home/pha/Music/")
with target_path.open(mode="r", encoding="UTF-8") as target_path_opened, \
expected_playlist_xml.open("r") as expected_playlist_xml_opened:
actual_playlist_xml = target_path_opened.read()
expected_playlist_xml = expected_playlist_xml_opened.read()
self.assertEqual(actual_playlist_xml, expected_playlist_xml, "{} and {} are different!".format(target_path_opened, expected_playlist_xml))
rhythmbox_playlists_writer_tests.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录