Bohuslav "Slavek" Kabrda <[email protected]> added the comment:
Fifth version :)
- On failure in a loaded test, the _test function returns, so this behaviour is
preserved.
- During _test function, count of both loaded and non-loaded files is kept.
- If a file fails to be loaded, the tests continue, but a non-zero return code
is returned. Moreover, the results of loaded and non-loaded files are printed
after each invocation.
This is a sample output:
$ python3 -m doctest -v spam c.py beans
Cannot read 'spam': [Errno 2] No such file or directory: 'spam'
Trying:
2 * 2
Expecting:
4
ok
1 items passed all tests:
1 tests in c
1 tests in 1 items.
1 passed and 0 failed.
Test passed.
Cannot read 'beans': [Errno 2] No such file or directory: 'beans'
Test files read successfully: 1
Unreadable files: 2
Does this look better?
----------
Added file:
http://bugs.python.org/file26239/doctest-dont-end-with-exception-on-unreadable-files-v5.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15178>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com