Commit 50fd4b3d authored by Yori Fournier's avatar Yori Fournier
Browse files

add some test for the new merged features (updateSyncFig and deleteSyncFig)

parent 35162722
Pipeline #427 passed with stage
in 3 minutes and 5 seconds
......@@ -14,16 +14,10 @@ import clientside.myplotlib as mpl_client
server = mpl_server.MplServer2(port=12345, knownFunctions=SERVER_IOFUNCTIONS, knownFigures=SERVER_FIGURES)
client = mpl_client.MplClient2()
# Start a thread with the server -- that thread will then start one
# more thread for each request
# server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
# server_thread.daemon = True
# server_thread.start()
server.run()
print "Server loop running in thread:", server.server_thread.name
client.connect(('localhost', 12345))
print("Client is now connected")
client.readData('readStupidData', 'data1')
fig1 = client.newSyncFigure(FigTestc, ('data1',))
......
......@@ -10,18 +10,23 @@ SERVER_FIGURES = {'FigTest': FigTests}
import serverside.myplotlib as mpl_server
import clientside.myplotlib as mpl_client
server = mpl_server.MplServer2(port=50803, knownFunctions=SERVER_IOFUNCTIONS, knownFigures=SERVER_FIGURES)
server = mpl_server.MplServer2(port=12345, knownFunctions=SERVER_IOFUNCTIONS, knownFigures=SERVER_FIGURES)
client = mpl_client.MplClient2()
# Start a thread with the server -- that thread will then start one
# more thread for each request
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
server_thread.daemon = True
server_thread.start()
print "Server loop running in thread:", server_thread.name
client.connect(('', 50803))
server.run()
print "Server loop running in thread:", server.server_thread.name
client.connect(('', 12345))
print("Client is now connected")
# create a figure
client.readData('readStupidData', 'data1')
fig = client.newSyncFigure(FigTestc, ('data1',))
fig1 = client.newSyncFigure(FigTestc, ('data1',))
# update test
fig1.update(xRange=[-2, 2],yRange=[-2, 2])
# multiple figures
fig2 = client.newSyncFigure(FigTestc, ('data1',), xRange=[-1.5, 1.5], yRange=[-1.5, 1.5])
fig1.deSyncFig()
fig2.deSyncFig()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment