def test_check_exists(tmpdir): expect_check = False const.args.folder = str(tmpdir) # prerequisites for determining filename global file_name file_name = internals.sanitize_title(title) check = spotdl.check_exists(file_name, raw_song, metadata) assert check == expect_check
def test_check_track_exists_before_download(tmpdir): expect_check = False const.args.folder = str(tmpdir) # prerequisites for determining filename songname = internals.format_string(const.args.file_format, meta_tags) global file_name file_name = internals.sanitize_title(songname) check = spotdl.check_exists(file_name, TRACK_URL, meta_tags) assert check == expect_check
def test_check_track_exists_after_download(): expect_check = True check = spotdl.check_exists(file_name, TRACK_URL, meta_tags) os.remove(track_path + ".mp3") assert check == expect_check
def test_check_track_exists_after_download(): expect_check = True check = spotdl.check_exists(file_name, raw_song, meta_tags) os.remove(track_path + '.mp3') assert check == expect_check