rephrase the test to expect InputError
hide implementation details
pass the test with the simplest way
clean code
cc