You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mock.IsMethodCallable doesn't work with dynamic expected arguments #1712
Mock.IsMethodCallable implements its own incomplete expected argument checking. So it doesn't always work. It should be using the same methods as Mock.Called to check if it is callable.
It also has no reason to accept a TestingT, it doesn't use it at all, there is no point calling Helper, which also isn't part of TestingT.
I also see no sensible use case for IsMethodCallable.
Description
If the expected Args of a Call in Mock.ExpectedCalls are dynamic (mock.Anything, mock.MatchedBy, etc...) then Mock.IsMethodCallable will return the wrong answer.
Activity
brackendawson commentedon Mar 22, 2025
Also it's amusing that a method which does not exist is "Callable"?
gopherjit commentedon Mar 24, 2025
@brackendawson please assign this issue to me.