I am on a learning stage of using python as a tool for software QA.
I wrote the next simple test in order to find the letter \'a\' in a text file number matrix. prob
This:
return;
Makes your function return None
.
Did you mean return t
?
Besides that, IMHO doctest
tests are meant to be self-contained. This is something the user should see in your documentation and understand without context. In your example, you're using a module-local arr_fin_1
object which is completely opaque to the user. It's better to define it in the doctest before the find_letter
call to provide a self-contained example.
You've got an extra space after the 97 - if you remove it, your test should run fine.