I am running a python multithreaded code which runs only once if i run it through python file but runs twice if i run it through Robot file :
python file code :
def connect():
print("Step 12: Reload devices")
config_threads_list = []
ipAddress = '172.22.12.14'
username = 'abcd'
password = 'abcd'
devices = ['5023','5024','5025','5026']
for ports in devices:
consoleServer, username, password, port = ipAddress, username, password, ports
print ('Creating thread for: ', ports)
config_threads_list.append(threading.Thread(target=obj.router_reload, args=(consoleServer, username, password, port)))
print ('
---- Begin get config threading ----
')
for config_thread in config_threads_list:
config_thread.start()
for config_thread in config_threads_list:
config_thread.join()
connect()
this code works fine when i run it through python only . However when i run it through robot framework its running twice
robot file :
Documentation Test case
Library <path to above py file >
*** Test Cases ***
TEST CASE LEL-TC-1
connect
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…