Commit f10e04e6 authored by Dimitris Lampridis's avatar Dimitris Lampridis

tst: code cleanup

parent b14d6642
......@@ -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")
......
......@@ -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
......
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