Issue 24 in pymox: IgnoreArgs

34 views
Skip to first unread message

codesite...@google.com

unread,
Jun 28, 2010, 4:03:46 PM6/28/10
to mox-d...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 24 by iceman: IgnoreArgs
http://code.google.com/p/pymox/issues/detail?id=24

sometimes i really don't want to care about any of the args. afaict the
only way to do this is multiple mox.IgnoreArg() arguments, that's silly.
allow mox.IgnoreArgs() to just ignore all args so we're not testing things
we don't care to test (e.g. how many args are sent to our logging function!)

codesite...@google.com

unread,
Jun 28, 2010, 5:26:14 PM6/28/10
to mox-d...@googlegroups.com
Updates:
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

Comment #1 on issue 24 by steve.middlekauff: IgnoreArgs
http://code.google.com/p/pymox/issues/detail?id=24

(No comment was entered for this change.)

codesite...@google.com

unread,
Oct 11, 2012, 4:56:59 PM10/11/12
to mox-d...@googlegroups.com

Comment #2 on issue 24 by danielw...@google.com: IgnoreArgs
http://code.google.com/p/pymox/issues/detail?id=24

use-case: logging.error et. al. It is recommended that the % not be used in
logging calls, and instead to pass var args. If my test just verifies that
logging calls are made, it can't (or at least shouldn't) know how many args
logging.error (or whatever) receives.

In this case, IgnoreAllArgs is not just a convenience, it makes tests more
robust, because if the logging calls are changed by adding more arguments,
having a fixed number of IgnoreArg's will result in a broken test, even if
the code under test is correct.

Anyway, not a huge deal, but definitely nice to have.

Reply all
Reply to author
Forward
0 new messages