This commit is contained in:
Ichinga Samuel
2024-11-04 00:32:51 +01:00
parent 2c46e18528
commit d65a8db1a2
85 changed files with 5071 additions and 2512 deletions
+5 -6
View File
@@ -10,7 +10,7 @@ class TestBotFactoryAndExecutor:
def setup_class(cls):
cls.bot = Bot()
@pytest.fixture(scope='class', autouse=True)
@pytest.fixture(scope="class", autouse=True)
async def initialize(self):
self.bot.add_coroutine(coroutine=self.coro_one)
self.bot.add_coroutine(coroutine=self.coro_two)
@@ -20,24 +20,24 @@ class TestBotFactoryAndExecutor:
@staticmethod
def fun_one():
print('function one')
print("function one")
@staticmethod
async def coro_thread():
while True:
print('coroutine thread')
print("coroutine thread")
await asyncio.sleep(1)
@staticmethod
async def coro_one():
while True:
print('coroutine one')
print("coroutine one")
await asyncio.sleep(1)
@staticmethod
async def coro_two():
while True:
print('coroutine two')
print("coroutine two")
await asyncio.sleep(1)
def test_add_workers(self):
@@ -46,5 +46,4 @@ class TestBotFactoryAndExecutor:
# task_queue already added coroutine_thread
assert len(self.bot.executor.coroutine_threads) == 2
# def