self.assertRaisesRegex(TypeError, msg, {}.__contains__, 0, 1)
def test_varargs3(self):
- msg = r"^from_bytes\(\) takes at most 2 positional arguments \(3 given\)"
+ msg = r"^from_bytes\(\) takes exactly 2 positional arguments \(3 given\)"
self.assertRaisesRegex(TypeError, msg, int.from_bytes, b'a', 'little', False)
def test_varargs1min(self):
"%.200s%s takes %s %d positional argument%s (%d given)",
(parser->fname == NULL) ? "function" : parser->fname,
(parser->fname == NULL) ? "" : "()",
- (parser->min != INT_MAX) ? "at most" : "exactly",
+ (parser->min < parser->max) ? "at most" : "exactly",
parser->max,
parser->max == 1 ? "" : "s",
nargs);