-
Notifications
You must be signed in to change notification settings - Fork 17
/
testing.py
49 lines (41 loc) · 1.02 KB
/
testing.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
import dicts.weapons_skills as ws
# Name strip test
def test2():
mystring = 'ferocious Bear'
if not mystring.startswith('Dead'):
if len(mystring.split(' ')) < 2:
mystring = 'Dead %s' % mystring
else:
no_variation = mystring.split(' ', 1)
print(no_variation)
mystring = no_variation[1]
print(mystring)
mystring = '{} {}'.format('Dead', mystring)
print(mystring)
var = 2
def myfunc():
var = 5
return var
# OR test
def or_test():
i = 3
if i == 2 or i == 3:
print('i is %s' % i)
else:
print('None')
def func_return_test():
print(myfunc())
print(var)
myfunc()
print(var)
def imp_test():
x = ws.SKILLS['doubletrouble']
print(x)
def dict_test():
mydictionary = {'apple': 'red', 'banana': 'yellow'}
item = mydictionary['apple']
print(mydictionary['apple'])
def main():
imp_test()
if __name__ == '__main__':
main()