Hi,

I'm writing a custom AMP type. I noticed that when writing the unit test
for garbage input, I didn't really know what exception to check for.

I couldn't find any place where this was formally defined, so I checked for
implementation behavior. Boolean explicitly raises TypeError. Integer
raises ValueError, but that appears to only be an implementation detail of
int.

It could also be that it doesn't matter at all, but it does seem a little
strange that Integer and Boolean raise different exceptions when fed
garbage...

-- 
cheers
lvh
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to