-
Notifications
You must be signed in to change notification settings - Fork 1
/
testing_script.py
44 lines (37 loc) · 998 Bytes
/
testing_script.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
# import all the commands from dot.py file located in the same directory
import bot
def test_clear(n):
try:
bot.clear(n)
except:
raise Exception()
else:
print('No errors, code ran perfectly')
def test_register(discord_mem, handle):
try:
bot.register(discord_mem, handle)
except:
raise Exception()
else:
print('No errors, code ran perfectly')
def test_userinfo(handle):
try:
bot.userinfo(handle)
except:
raise Exception()
else:
print('No errors, code ran perfectly')
def test_stalk(handle):
try:
bot.stalk(handle)
except:
raise Exception('an unexpected error occurred') # this error may occur due to Codeforces API
else:
print('No errors, code ran perfectly')
def test_clist():
try:
bot.clist()
except:
raise Exception()
else:
print('No errors, code ran perfectly')