Commit 71354c39 authored by Robin Obůrka's avatar Robin Obůrka Committed by Robin Obůrka

msgloop: Add args parameter to sn_main to make it testable

I use the same hack as in sn.SN itself.

It doesn't work with mock from some reason.
parent 446eac10
......@@ -28,8 +28,8 @@ def signal_handler(signum, frame):
raise SignalReceived()
def sn_main(box_name, setup=None, process=None, teardown=None, argparser=None):
ctx = SN(zmq.Context.instance(), argparser or get_arg_parser())
def sn_main(box_name, setup=None, process=None, teardown=None, argparser=None, args=None):
ctx = SN(zmq.Context.instance(), argparser or get_arg_parser(), args=args)
socket_recv, socket_send = detect_and_get_sockets(ctx)
if not socket_recv and not socket_send:
......
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