-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdebug_bot_command.py
122 lines (85 loc) · 2.82 KB
/
debug_bot_command.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import bot_command
import bot_config
import bot_json_data
import logging.config
import collections
# <editor-fold desc="setting">
logging.config.fileConfig("logging.conf")
logger = logging.getLogger()
config = bot_config.BotConfig()
json_data = bot_json_data.BotJsonData(logger, config)
commandUsers = []
# </editor-fold>
json_data.bot_json_data()
command = bot_command.BotCommand(logger, config, json_data)
def debug_bot_command_help(words):
words.insert(0, 'dummy_cmd')
help_results = []
for n in range(0, 1000):
result = command.bot_command_help(words)
help = result[0]
help_results.append(help)
c = collections.Counter(help_results)
print(c)
def debug_bot_command_tier(words):
words.insert(0, 'dummy_cmd')
tier_results = []
for n in range(0, 1000):
result = command.bot_command_tier_execute(words)
tier = result[0]
tier_results.append(tier)
c = collections.Counter(tier_results)
print(c)
def debug_bot_command_ship(words):
words.insert(0, 'dummy_cmd')
ships_results = []
for n in range(0, 1000):
result = command.bot_command_ship_execute(words)
ships = result[0]
ships_results.extend(ships)
c = collections.Counter(ships_results)
print(c)
def debug_bot_command_choice(words):
words.insert(0, 'dummy_cmd')
choice_results = []
for n in range(0, 1000):
result = command.bot_command_choice_execute(words)
choice = result[0]
choice_results.append(choice)
c = collections.Counter(choice_results)
print(c)
def debug_bot_command_pickup(words):
words.insert(0, 'dummy_cmd')
pickups_results = []
for n in range(0, 1000):
result = command.bot_command_pickup_execute(words)
pickups = result[0]
pickups_results.extend(pickups)
c = collections.Counter(pickups_results)
print(c)
def debug_bot_command_team(words):
words.insert(0, 'dummy_cmd')
teams_results = []
for n in range(0, 1000):
result = command.bot_command_team_execute(words)
teams = result[0]
teams_results.extend(teams)
c = collections.Counter(teams_results)
print(c)
def debug_bot_command_luck(words):
words.insert(0, 'dummy_cmd')
luck_results = []
for n in range(0, 1000):
words = []
result = command.bot_command_luck_execute(words)
choice = result[0]
luck_results.append(choice)
c = collections.Counter(luck_results)
print(c)
# debug_bot_command_help(['1', '10'])
# debug_bot_command_tier(['1', '10'])
# debug_bot_command_ship(['8', '8', '1', 'DD日'])
# debug_bot_command_choice(['A', 'B', 'C', 'D', 'E'])
# debug_bot_command_pickup(['2', 'A', 'B', 'C', 'D', 'E'])
debug_bot_command_team(['2', 'A', 'B', 'C', 'D', 'E'])
# debug_bot_command_luck([''])