-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
executable file
·45 lines (36 loc) · 1.01 KB
/
test.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
#!/usr/bin/python
import sys
def testLocalDisplay():
import Tests.TestPygameDisplay as T1
T1.main()
def testSocketUDP():
import Tests.TestSocketsUDP as T2
T2.main()
def testSimpleProtocol():
import Tests.TestSimpleProtocol as T3
T3.main()
def testSendData():
import Tests.TestSendData as T4
T4.main()
def testSendTCP():
import Tests.TestSendDataTCP as T5
T5.main()
def main(argv):
if len(argv)>0:
if(argv[0]=="localDisplay"):
testLocalDisplay()
elif(argv[0]=="socketUDP"):
testSocketUDP()
elif(argv[0]=="simpleProtocol"):
testSimpleProtocol()
elif(argv[0]=="sendData"):
testSendData()
elif(argv[0]=="tcp"):
testSendTCP()
else:
print("Test not valid")
else:
print("To run the tests, run ./test.py [command]")
print("The list of commands can be found at the moment in the source of test.py")
if __name__ == "__main__":
main(sys.argv[1:])