fixed changed test to catch ValueError. Changed add_alpha_to_mapping to ...

...raise value error. Issue #1035.