Issue 24 in pymox: IgnoreArgs

Skip to first unread message

Jun 28, 2010, 4:03:46 PM6/28/10
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 24 by iceman: IgnoreArgs

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!)

Jun 28, 2010, 5:26:14 PM6/28/10
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

Comment #1 on issue 24 by steve.middlekauff: IgnoreArgs

(No comment was entered for this change.)

Oct 11, 2012, 4:56:59 PM10/11/12

Comment #2 on issue 24 by IgnoreArgs

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
0 new messages