Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yori Fournier
myplotlib
Commits
fef9eefb
Commit
fef9eefb
authored
Feb 07, 2018
by
Yori Fournier
Browse files
add a network test
parent
fdbdd6f2
Pipeline
#423
failed with stage
in 3 minutes and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
fef9eefb
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
test/network/test_com_nogl.py
0 → 100644
View file @
fef9eefb
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'
,))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment