From 7faf63809d1b984a1e4e4fc989491b10090565df Mon Sep 17 00:00:00 2001 From: fakz9 Date: Sat, 6 Jul 2024 05:30:22 +0300 Subject: [PATCH] v1.0 --- test.py | 82 ++------------------------------------------------------- 1 file changed, 2 insertions(+), 80 deletions(-) diff --git a/test.py b/test.py index b8017b6..715e793 100644 --- a/test.py +++ b/test.py @@ -1,80 +1,2 @@ -import asyncio -import time - -from limiter import BatchLimiter - - -async def test1(): - limiter = BatchLimiter() - cnt = 0 - for i in range(100): - await limiter.acquire_ozon('denco') - cnt += 1 - print('ozon denco-1', cnt) - - -async def test2(): - limiter = BatchLimiter() - cnt = 0 - for i in range(100): - await limiter.acquire_ozon('denco') - cnt += 1 - print('ozon denco-2', cnt) - - -async def test3(): - limiter = BatchLimiter() - cnt = 0 - for i in range(100): - await limiter.acquire_wildberries('denco') - cnt += 1 - print('wb denco-1', cnt) - - -async def test4(): - limiter = BatchLimiter() - cnt = 0 - for i in range(100): - await limiter.acquire_wildberries('denco') - cnt += 1 - print('wb denco-2', cnt) - - -async def test5(): - limiter = BatchLimiter() - cnt = 0 - for i in range(100): - await limiter.acquire_wildberries('denco') - cnt += 1 - print('wb denco-2', cnt) - - -async def test6(): - limiter = BatchLimiter() - cnt = 0 - for i in range(100): - await limiter.acquire_ozon('bolgov') - cnt += 1 - print('wb bolgov-1', cnt) - - -async def test(): - start = time.time() - await asyncio.gather(*[ - test1(), - # test2(), - # test3(), - # test4(), - # test5(), - # test6(), - ]) - print(time.time() - start) - - -def main(): - loop = asyncio.get_event_loop() - loop.run_until_complete(test()) - - -if __name__ == '__main__': - main() +a = [1] +print(a[:1], a[1:])