fix testbot misc

This commit is contained in:
Aleksej 2022-06-13 23:34:16 +02:00
parent 22c80eaf54
commit 9aa08adef8
No known key found for this signature in database
GPG Key ID: 4DB9C85100A6D17F

View File

@ -3,6 +3,7 @@
import argparse
import slixmpp
import configparser
import time
CONFIG_PATH = "./testconfig.ini"
@ -31,14 +32,21 @@ def allmsgsrecv():
for i in results2:
if i[2] == 0:
return False
return ret
# Print results and exit
def printandexit():
print("Results of test:")
for i in results1:
print(i[0].rstrip + " : " + str(round(i[2]-i[1],2)) + " secounds")
if i[2] == 0:
print(i[0] + " : Not recieved)
else:
print(i[0].rstrip() + " : " + str(round(i[2]-i[1],2)) + " secounds")
for i in results2:
print(i[0].rstrip + " : " + str(round(i[2]-i[1],2)) + " secounds")
if i[2] == 0:
print(i[0] + " : Not recieved)
else:
print(i[0].rstrip() + " : " + str(round(i[2]-i[1],2)) + " secounds")
exit()
def show_version():
@ -93,7 +101,7 @@ class MUCBot(slixmpp.ClientXMPP):
if i[0] == body:
i[2] = rtime
if allmsgsrecv:
if allmsgsrecv() is True:
printandexit()