[issue15178] Doctest should handle situations when test files are not readable

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15178] Doctest should handle situations when test files are not readable

2015-02-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15178 ___ ___

[issue15178] Doctest should handle situations when test files are not readable

2015-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doctest still failed with backtrace if argument is a file name. $ ./python -m doctest aaa.py Traceback (most recent call last): File /home/serhiy/py/cpython/Lib/runpy.py, line 170, in _run_module_as_main __main__, mod_spec) File

[issue15178] Doctest should handle situations when test files are not readable

2014-12-12 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: Attaching a new version of patch: - Rebased to latest default branch - Simplified prints - Using OSError instead of IOError Hopefully this is the final version :) -- Added file:

[issue15178] Doctest should handle situations when test files are not readable

2014-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15178 ___

[issue15178] Doctest should handle situations when test files are not readable

2014-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added few nitpicks on Rietveld. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15178 ___

[issue15178] Doctest should handle situations when test files are not readable

2014-06-22 Thread Mark Lawrence
Mark Lawrence added the comment: @David can you pick this up given your previous involvement? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15178 ___

[issue15178] Doctest should handle situations when test files are not readable

2014-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15178 ___ ___

[issue15178] Doctest should handle situations when test files are not readable

2012-07-03 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda bkab...@redhat.com 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

[issue15178] Doctest should handle situations when test files are not readable

2012-07-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I think that sounds reasonable. The message should say files in all three cases', since the individual test file summary method will be similar but talking about numbers of tests. -- ___

[issue15178] Doctest should handle situations when test files are not readable

2012-07-01 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda bkab...@redhat.com added the comment: So maybe an optimal solution would be to add a note summarizing this to the end of output? I mean that this: X passed and Y failed. Could be replaced by: X passed and Y failed, Z files were not loaded. Then the user will know that

[issue15178] Doctest should handle situations when test files are not readable

2012-06-30 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Failure modes tend to get less attention that successful behavior. If I wrote a program that used doctest/unittest to test multiple files, I should like it to run an many as possible. If a filename is bad, print name as usual, say 'aborted',

[issue15178] Doctest should handle situations when test files are not readable

2012-06-30 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The problem with running all the files as things stand is that the errors get lost in the other output. Changing that would definitely be an enhancement. -- ___ Python tracker

[issue15178] Doctest should handle situations when test files are not readable

2012-06-26 Thread Bohuslav Slavek Kabrda
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

[issue15178] Doctest should handle situations when test files are not readable

2012-06-26 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, right, I misread the code when I looked at it. There is usually a reason why something is done the way it is...though not always. But, running some example command lines, it looks to me like the current behavior is there because

[issue15178] Doctest should handle situations when test files are not readable

2012-06-26 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda bkab...@redhat.com added the comment: Ok, attaching 4th version :) I think it is nice when the testing library can react in situations like this one and not show a traceback. IMHO it is always nicer to display a pretty user-readable message than ending with a traceback.

[issue15178] Doctest should handle situations when test files are not readable

2012-06-25 Thread Bohuslav Slavek Kabrda
New submission from Bohuslav Slavek Kabrda bkab...@redhat.com: Hi, I think that doctest should be able to handle situations when the file that is being tested does not exist/is unreadable/etc... Currently, doctest raises an IOError exception and the whole Python ends with an exception and

[issue15178] Doctest should handle situations when test files are not readable

2012-06-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: In general in Python we let exceptions speak for themselves. It would, however, probably be reasonable to add the try/except and error message in _test, which should only be called when the module is run as a script. -- nosy:

[issue15178] Doctest should handle situations when test files are not readable

2012-06-25 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda bkab...@redhat.com added the comment: Thanks for the comment David. I'm attaching second version that does the same in the _test function. -- Added file: http://bugs.python.org/file26155/doctest-dont-end-with-exception-on-unreadable-files-v2.patch

[issue15178] Doctest should handle situations when test files are not readable

2012-06-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Great, thanks. There's a loop around testfiles. I think it would be nicer to not call sys.exit. You could at the same time fix what appears to be a bug in the loop code. It looks like 1 is currently returned only if the last file

[issue15178] Doctest should handle situations when test files are not readable

2012-06-25 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda bkab...@redhat.com added the comment: Sure, if you give me some time, I'll try to do everything as you suggest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15178