Bohuslav "Slavek" Kabrda <bkab...@redhat.com> added the comment:

So I figured it might be best to first agree on the actual behaviour (what the 
patch will look like) and then I can write the tests.

So here is my 3rd version:
- It seems that returning 1 only if last file fails is intentional, as it is 
_inside_ the loop, so unsuccessful test immediately terminates the _test 
function - I thought it might be better to carry on with all of the tests, so 
here is what I did:
- I made a variable "failures", which represents if there were any failures 
during tests;
- I took the "return 1" one indentation level down, so all files are now 
traversed no matter how many of them fail;
- An error message is printed and "failures" set to True if a file is 
unopenable.

Does this look acceptable? If not, I will happily work further :) (and provide 
the tests once the behaviour is clear).

Thanks!

----------
Added file: 
http://bugs.python.org/file26165/doctest-dont-end-with-exception-on-unreadable-files-v3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15178>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to