[Python-Dev] [Python-checkins] cpython: Issue #14769: test_capi now has SkipitemTest, which cleverly checks (original) (raw)
Terry Reedy tjreedy at udel.edu
Fri Jun 22 18:39:42 CEST 2012
- Previous message: [Python-Dev] Summary of Python tracker Issues
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #14769: test_capi now has SkipitemTest, which cleverly checks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/22/2012 6:57 AM, larry.hastings wrote:
http://hg.python.org/cpython/rev/ace45d23628a changeset: 77567:ace45d23628a user: Larry Hastings <larry at hastings.org> date: Fri Jun 22 03:56:29 2012 -0700 summary: Issue #14769: testcapi now has SkipitemTest, which cleverly checks for "parity" between PyArgParseTuple() and the Python/getargs.c static function skipitem() for all possible "format units".
You sensibly only test printable ascii chars, which are in the contiguous range 32 to 127 inclusive. So it makes no sense to claim otherwise and then deny the wrong claim, or to enlarge the range and then shrink it again.
+ This function brute-force tests all** ASCII characters (1 to 127 + inclusive) as format units, checking to see that
With a few exceptions**, test all printable ASCII characters (32 to 127 inclusive) as...
+ + ** Okay, it actually skips some ASCII characters. Some characters
** Some characters ...
+ have special funny semantics, and it would be difficult to + accomodate them here.
+ for i in range(1, 128):
for i in range(32, 128):
+ if (not c.isprintable()) or (c in '()e|$'):
if c in '()e|$':
tjr
- Previous message: [Python-Dev] Summary of Python tracker Issues
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #14769: test_capi now has SkipitemTest, which cleverly checks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]