Issue 12 in pymox: MockObject should be smarter about recording args vs kwargs

2 views
Skip to first unread message

codesite...@google.com

unread,
Sep 25, 2009, 4:29:39 PM9/25/09
to mox-d...@googlegroups.com
Status: New
Owner: smiddlek
Labels: Type-Defect Priority-Medium

New issue 12 by smiddlek: MockObject should be smarter about recording args
vs kwargs
http://code.google.com/p/pymox/issues/detail?id=12

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. I'm not sure if this is possible or not,
but I'd like to hope so.


What is the expected output? What do you see instead?

See above.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Sep 25, 2009, 4:33:47 PM9/25/09
to mox-d...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Enhancement

Comment #1 on issue 12 by smiddlek: MockObject should be smarter about

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages