Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
proxy() does not play well with patched methods #27
Let's say we have an exciting actor that does nothing:
class NopActor(pykka.ThreadingActor): def __init__(self): super(NopActor, self).__init__() def do_nothing(self): return
If we try to patch it using Voidspace mock to verify it gets called somehow, somewhere.
@patch.object(NopActor, 'do_nothing') def should_be_able_to_spy_on_actors(mock_method): nop_actor = NopActor.start().proxy() # blocks indefinitely nop_actor.do_nothing().get() mock_method.assert_called_once_with()
The test hangs indefinitely. This could be related to or the same issue as #26.
I have no identified a workaround for this case.