Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
f10e04e6
Commit
f10e04e6
authored
Sep 14, 2023
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tst: code cleanup
parent
b14d6642
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
conftest.py
tests/conftest.py
+0
-6
test_hmq.py
tests/test_hmq.py
+0
-20
No files found.
tests/conftest.py
View file @
f10e04e6
...
...
@@ -92,12 +92,6 @@ def trtl_version_exp():
return
v
# @pytest.fixture(scope="module")
# def trtl_hmq():
# dev = PyMockTurtle.TrtlDevice(devid()) for cpu in dev.cpu:
# for hmq in cpu.hmq:
# yield hmq
def
pytest_addoption
(
parser
):
parser
.
addoption
(
"--id"
,
type
=
lambda
x
:
int
(
x
,
0
),
required
=
True
,
help
=
"Mockturtle identifier"
)
...
...
tests/test_hmq.py
View file @
f10e04e6
...
...
@@ -143,26 +143,6 @@ class TestHmq(object):
break
assert
i
==
val
def
__do_sync_msg
(
self
,
hmq
,
trtl_msg
):
msg_r_a
=
[]
# I do not understand why I can't make Pool() working.
# it complains about hmq
# with multiprocessing.Pool(processes=len(trtl_msg)) as p:
# msg_r_a = p.starmap(do_sync_msg,
# [(hmq, msg) for msg in trtl_msg])
proc
=
[]
for
msg
in
trtl_msg
:
q
=
multiprocessing
.
Queue
()
proc
.
append
((
q
,
multiprocessing
.
Process
(
target
=
do_sync_msg
,
args
=
(
q
,
hmq
,
msg
))))
for
q
,
p
in
proc
:
p
.
start
()
for
q
,
p
in
proc
:
msg_r_a
.
append
(
q
.
get
())
p
.
join
()
return
msg_r_a
@
pytest
.
mark
.
parametrize
(
"nproc"
,
range
(
1
,
5
))
def
test_sync_no_multone
(
self
,
trtl_cpu
,
nproc
):
"""The driver should not accept more than 1 sync message at time
...
...
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