104 print(client.call("Echo123", "A1", "B2", "C3"))
105 print(client.call("EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}))
106
107# def doCheckSocket(port):108# print(">>>> port: ", port, " <<<<<")
109# sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
110# result = sock.connect_ex(('127.0.0.1', port))
72def build_test_data(destdir):
73 l = get_test_data_list()
74 for i in range(len(l)):
75 # packer = msgpack.Packer() 76 serialized = msgpack.dumps(l[i])
77 with open(os.path.join(destdir, str(i) + '.msgpack.golden'), 'wb') as f:
78 f.write(serialized)
It is recommended to remove any commented code in your codebase.
for item in sequence:
# print(item)
do_something(item)
# def old_function():
# '''Older implementation that has been replaced'''
# data = get_data()
# api.post(data)
for item in sequence:
do_something(item)