#1947·testify

mock.Call.Time documentation incomplete

Author: brackendawsonCreated Aug 31, 2026Updated Aug 31, 2026
Labelsbug

Description

mock.Call.Times has the doc:

Times indicates that the mock should only return the indicated number of times.

.Times(n)

  • n=0 (default): the call must be made 1 or more times.
  • n>1: the call must be made n times.

.Maybe()

The call must be made 0 or more times.

The doc-string should document the behavior when calling with 0.

reported in #1855