Issue #9 invalid

When a return value is given, the call is represented in the call list even though you can't assert it's arguments.

Eric Larson
created an issue

{{{

!python

d = Dingus(return_value='foo')

d('hello', 'world') 'foo'

d.calls('()', ('hello', 'world')) []

d.calls() [('()', ('hello', 'world'), {}, 'foo')]

}}}

Comments (2)

  1. Gary Bernhardt repo owner

    The calls() function takes positional arguments, not an arguments tuple. I think it's working correctly:

    >>> d = Dingus(return_value='foo')
    >>> d('hello', 'world')
    'foo'
    >>> d.calls('()', 'hello', 'world')
    [('()', ('hello', 'world'), {}, 'foo')]
    
  2. Eric Larson reporter

    Thanks for clarifying that. I feel like I've run into the case where I needed an arguments tuple vs. positional args, but I could be mistaken.

  3. Log in to comment