From ce047227632e0ec1109962a325262b88b210ebcf Mon Sep 17 00:00:00 2001 From: codey Date: Fri, 17 Jan 2025 07:53:33 -0500 Subject: [PATCH] rm tests --- lyric_search_new/tests.py | 62 --------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 lyric_search_new/tests.py diff --git a/lyric_search_new/tests.py b/lyric_search_new/tests.py deleted file mode 100644 index e998528..0000000 --- a/lyric_search_new/tests.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python3.12 -# pylint: disable=invalid-name, missing-function-docstring, wrong-import-position - -import asyncio -import sys -import time -sys.path.insert(1, '.') -import sources.cache, sources.genius, sources.aggregate, sources.lrclib # pylint: disable=import-error, multiple-imports - -""" -tests -""" - -test_artist = "enter shikari" -test_song = "goldfish" - -async def test_cache(artist, song): - cache = sources.cache.Cache() - result = await cache.search(artist, song) - if not result: - print(f"Could not find {artist} - {song}!") - return - print(result.dict()) - - # print(f"artist: {ret_artist}\nsong: {ret_song}:\n{ret_lyr}") - # print(result) - -async def test_genius(artist=None, song=None): - if not artist or not song: - artist = test_artist - song = test_song - genius = sources.genius.Genius() - result = await genius.search(artist, song) - print(result) - -async def test_lrclib(artist=None, song=None): - if not artist or not song: - artist = test_artist - song = test_song - lrclib = sources.lrclib.LRCLib() - result = await lrclib.search(artist, song) - print(result) - -async def test_aggregate(artist=None, song=None): - if not artist or not song: - artist = test_artist - song = test_song - aggregate = sources.aggregate.Aggregate() - result = await aggregate.search(artist, song) - print(result.dict()) - - - -loop = asyncio.new_event_loop() -start_time = time.time() -# loop.run_until_complete(test_genius()) -loop.run_until_complete(test_lrclib()) -# loop.run_until_complete(test_cache(artist=test_artist, song=test_song)) -# loop.run_until_complete(test_aggregate()) -end_time = time.time() -diff = (end_time - start_time) -print(f"Response returned in: {diff:.6f}s") \ No newline at end of file