Isn't the runtime error catched here and will never be raised? Probably assert_raises is better suitable here?