Open jbrockmendel opened 5 years ago
+1 for consistency. A decorator would be great, though that would be a little trickier to execute.
Also, for future reference, the reason for checking error messages in our tests is because those are important for end users when debugging code. Making sure that they're accurate is important, just as the type of error that is raised.
@jbrockmendel can you convert these to check boxes in the top (e.g. 4 would be checked by #23896 )
A ton of comparison and arithmetic operations do something combination of:
other = lib.item_from_zerodim(other)
NotImplemented
if operating against a senior classValueError
if there is a length mismatchBut we don't always do all of these, and we definitely don't use+test error messages as consistent as @gfyoung would like.
This behavior could all be collected+standardized in a decorator