Copied from exercism/exercism#1376 - reported by @hop
Please see the original discussion for details.
In case there is an import error in the implementation of the exercise, the misleading error message 'Could not find wordcount.py. Does it exist?' is emitted and the original error message is hidden.
I'm not entirely sure what a good alternative would look like, but something like this would be a start:
try:
from foo import Bar
except ImportError as e:
raise SystemExit('Could not import foo.py.'
'This was the error: '+str(e))
Copied from exercism/exercism#1376 - reported by @hop
Please see the original discussion for details.
In case there is an import error in the implementation of the exercise, the misleading error message
'Could not find wordcount.py. Does it exist?'is emitted and the original error message is hidden.I'm not entirely sure what a good alternative would look like, but something like this would be a start: