Test Parse Exit

When I restructured the TypeAdapter hierarchy, I lost the ability to put a Parse routine in the fixtures. This facility allows the fixture writer to plug a parse routine into any of the binding objects, and have it called before (or instead of) the type adapter's Parse routine.

The Parse routine must be a callable that takes one parameter (the string to parse) and that returns a tuple of two objects. The first object is a character string of "OK", "Continue" or "Error"; the second object depends on the first. For "OK", it's the object to be returned to the caller: the type adapter's parse routine will not be called. For "continue", the type adapter's parse routine will be called either with the second object if it's a string, or the original string if it's None. If the first object is "error", the second must be a string that will either be passed back as an error message or will be the 'args' parameter on an exception, depending on another parameter.

The first row of the fixture is simply some indicative labels; they are not processed in any way. The cells in each succeeding row works as follows:

tests.ParseExit
type exit 1 value result 1 exit 2 result 2
string reverse kafuzalum mulazufak reverse kafuzalum
string sort kafuzalum aafklmuuz reverse zuumlkfaa

The values in the result columns should be green if it works.

fit.Summary