changes in test

This commit is contained in:
bacon
2024-03-17 22:56:37 +03:00
parent 93198bf82b
commit d93654043a
4 changed files with 17 additions and 8 deletions

View File

@@ -1,10 +1,14 @@
import os
import sys
import tracemalloc
tracemalloc.start()
import pytest
from disnake.ext.commands.common_bot_base import CommonBotBase
from mock import mock
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from bot.lib.CogsPrep import cog_list, work_with_cogs
@@ -31,3 +35,11 @@ async def test_work_with_cogs(what_do, cog):
assert mock_bot.unload_extension.called
elif what_do == 'reload':
assert mock_bot.reload_extension.called
snapshot = tracemalloc.take_snapshot()
top_stats = snapshot.statistics('lineno')
print("[ Top 10 ]")
for stat in top_stats[:10]:
print(stat)