Issue #45 resolved

_model property mapping has duplicate type handling check

Brian McMurray
created an issue

the _model in Emitter is currently only checking properties that aren't fields to see if they are 'int, basestring' or callable, with no handling if they are neither. If the property passes the 'int, basestring' check, it is simply handed off to _any, which again does type-mapping that is more robust.

The attached patch removes the unnecessary 'int,basestring' instance check and instead checks to see if the property is callable (as before) and if not passes it off to _any for better type-handling.

I believe I got the tests set up correctly and this patch passed the tests for 1.0 and 1.1.

Comments (1)

  1. Jesper Nøhr repo owner

    Applied in 7be2feef7fe2 . Thanks.

    The tests do indeed pass, thanks for checking :-) Now that you have it set up, it should be as easy as running

    cd tests
    ./bin/test-1.1
    

    ...so future patches should be easier to test.

  2. Log in to comment