in doubles/call_count_accumulator.py [0:0]
def _restriction_string(self):
"""Get a string explaining the expectation currently set
e.g `at least 5 times`, `at most 1 time`, or `2 times`
:rtype string
"""
if self.has_minimum:
string = 'at least '
value = self._minimum
elif self.has_maximum:
string = 'at most '
value = self._maximum
elif self.has_exact:
string = ''
value = self._exact
return (string + '{} {}').format(
value,
pluralize('time', value)
)