Add tests to main function

Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
nathom 2021-06-15 15:53:55 -07:00
parent 11443af6aa
commit 81d0686c26
2 changed files with 62 additions and 56 deletions

View file

@ -652,6 +652,7 @@ class MusicDL(list):
def essence(s): def essence(s):
s = re.sub(r"&#\d+;", "", s) # remove HTML entities s = re.sub(r"&#\d+;", "", s) # remove HTML entities
# TODO: change to finditer
return "".join(words.findall(s)) return "".join(words.findall(s))
def get_titles(s): def get_titles(s):

View file

@ -53,6 +53,7 @@ def check_album_dl_success(folder, correct):
click.secho(f"Check for {folder} succeeded!", fg="green") click.secho(f"Check for {folder} succeeded!", fg="green")
def main():
reset_config() reset_config()
download_albums() download_albums()
check_album_dl_success( check_album_dl_success(
@ -111,3 +112,7 @@ check_album_dl_success(
}, },
) )
restore_config() restore_config()
if __name__ == "__main__":
main()