Lines Matching refs:formatstr
15 def testformat(formatstr, args, output=None, limit=None, overflowok=False):
18 print("{!a} % {!a} =? {!a} ...".format(formatstr, args, output),
21 print("{!a} % {!a} works? ...".format(formatstr, args), end=' ')
23 result = formatstr % args
34 (formatstr, args, result, output))
45 (repr(formatstr), repr(args), repr(result), repr(output)))
50 def testcommon(formatstr, args, output=None, limit=None, overflowok=False):
51 # if formatstr is a str, test str, bytes, and bytearray;
53 if isinstance(formatstr, str):
54 testformat(formatstr, args, output, limit, overflowok)
55 b_format = formatstr.encode('ascii')
57 b_format = formatstr
74 def test_exc(formatstr, args, exception, excmsg):
76 testformat(formatstr, args)
91 def test_exc_common(formatstr, args, exception, excmsg):
93 test_exc(formatstr, args, exception, excmsg)
94 test_exc(formatstr.encode('ascii'), args, exception, excmsg)