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

MockObject should be smarter about recording args vs kwargs #22

Open
ivancrneto opened this issue Jan 6, 2024 · 0 comments
Open

MockObject should be smarter about recording args vs kwargs #22

ivancrneto opened this issue Jan 6, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ivancrneto
Copy link
Owner

Given the object:

class Foo(object):
    def bar(one, two, three=None):
        pass

When recording or replaying a MockObject(Foo)

 m_foo = mox.MockObject(Foo)
 # should be recorded in the same for both calls.
 m_foo.bar(1, 2, 3)  
 m_foo.bar(1, 2, three=3)

And verify should work for either:

 m_foo.bar(1, 2, 3)
 m_foo.bar(1, 2, 3)

... or ...

 m_foo.bar(1, 2, three=3)
 m_foo.bar(1, 2, three=3)

... or any combination thereof ...

This would require inspecting the method signature, and properly mapping
keyword args, where appropriate.

@ivancrneto ivancrneto added enhancement New feature or request good first issue Good for newcomers labels Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant