Commit fef9eefb authored by Yori Fournier's avatar Yori Fournier
Browse files

add a network test

parent fdbdd6f2
Pipeline #423 failed with stage
in 3 minutes and 2 seconds
before_script:
- apt-get update -q -y
- apt-get install python-dev python-tk -q -y
- wget https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- python -m pip --version
- python -m pip install --upgrade pip
- python -m pip install -U matplotlib
myplotlib_import_local_latex_tkagg:
script:
- apt-get update -q -y
- apt-get install python-dev python-tk -q -y
- wget https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- python -m pip --version
- python -m pip install --upgrade pip
- python -m pip install -U matplotlib
- git name-rev --name-only HEAD
- ls -l
- cd test/localhost
- ./setup_test_folder.sh -r latex-tkagg
- python import_test.py
- ./clean_test_folder.sh
myplotlib_import_network_latex_tkagg:
script:
- git name-rev --name-only HEAD
- ls -l
- cd test/network
- ./setup_test_folder.sh -r latex-tkagg
- python test_com_nogl.py
- ./clean_test_folder.sh
import threading
from serverside.myIOs import readStupidData
from serverside.figTest import FigTest as FigTests
from clientside.figTest import FigTest as FigTestc
SERVER_IOFUNCTIONS = {'readStupidData': readStupidData}
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)
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))
client.readData('readStupidData', 'data1')
fig = client.newSyncFigure(FigTestc, ('data1',))
Supports Markdown
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