Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy() does not play well with patched methods #27

Closed
fatuhoku opened this issue Sep 6, 2013 · 1 comment
Closed

proxy() does not play well with patched methods #27

fatuhoku opened this issue Sep 6, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@fatuhoku
Copy link

fatuhoku commented Sep 6, 2013

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.

@jodal jodal added this to the v2.0 milestone Jan 29, 2019
@jodal jodal self-assigned this Feb 8, 2019
jodal added a commit that referenced this issue Feb 8, 2019
@jodal
Copy link
Owner

jodal commented Feb 8, 2019

Fixed by commit dce57bd.

@jodal jodal closed this as completed Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants