changes in test
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user