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

Mamba doesn't work with mock.patch.object as a ContextManager #167

Open
jukiewiczm opened this issue Jan 23, 2024 · 0 comments
Open

Mamba doesn't work with mock.patch.object as a ContextManager #167

jukiewiczm opened this issue Jan 23, 2024 · 0 comments
Labels

Comments

@jukiewiczm
Copy link

jukiewiczm commented Jan 23, 2024

Hi there! Thank you for creating mamba!

Describe the bug

Mamba fails with

  File "/lib/python3.8/site-packages/mamba/nodetransformers.py", line 81, in _get_name
    return context_expr.func.value.id
AttributeError: 'Attribute' object has no attribute 'id'

How to reproduce it

with context("test context"):
    with it("test case"):
        with mock.patch.object(some_object, "some_attribute") as mocked_attribute:
            print("x")

Expected behavior

It should not fail.

Environment

  • Python version 3.8.3
  • Newest mamba version 0.11.3
@jukiewiczm jukiewiczm added the bug label Jan 23, 2024
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

1 participant