changes
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
#!/usr/bin/env python3.12
|
||||
# tests
|
||||
# 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
|
||||
import sources.cache, sources.genius, sources.aggregate, sources.lrclib # pylint: disable=import-error, multiple-imports
|
||||
|
||||
test_artist = "hopsin"
|
||||
test_song = "ill mind of fssfgdfhopsin 5"
|
||||
"""
|
||||
tests
|
||||
"""
|
||||
|
||||
test_artist = "enter shikari"
|
||||
test_song = "goldfish"
|
||||
|
||||
async def test_cache(artist, song):
|
||||
cache = sources.cache.Cache()
|
||||
@@ -47,7 +52,11 @@ async def test_aggregate(artist=None, song=None):
|
||||
|
||||
|
||||
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_lrclib())
|
||||
# loop.run_until_complete(test_cache(artist=test_artist, song=test_song))
|
||||
loop.run_until_complete(test_aggregate())
|
||||
# loop.run_until_complete(test_aggregate())
|
||||
end_time = time.time()
|
||||
diff = (end_time - start_time)
|
||||
print(f"Response returned in: {diff:.6f}s")
|
Reference in New Issue
Block a user