[issue10611] sys.exit() in a test causes a test run to die

2021-09-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -26829

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2021-09-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
nosy_count: 4.0 -> 5.0
pull_requests: +26829
pull_request: https://github.com/python/cpython/pull/28180

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2014-11-07 Thread Robert Collins

Robert Collins added the comment:

Hmm, so testtools went in a different direction here - the same unification 
stuff, but see 
https://github.com/testing-cabal/testtools/commit/18bc5741cf277f7a0d601568be6dccacc7b0783c

tl;dr - I think unittest should not prevent this causing the process to exit 
(but it should still fail the test and fail the test run as a whole), analgous 
to how KeyboardInterrupt is handled.

--
nosy: +rbcollins

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2014-11-07 Thread Michael Foord

Michael Foord added the comment:

Allowing sys.exit() to end the test run was particularly a problem for testing 
command line tools, where improper patching / unexpected code paths would 
trigger a sys.exit.

If a test framework author wants a way to end the test run I'm happy to provide 
that (a custom exception to raise or a flag to turn off sys.exit handling), but 
I don't think having sys.exit kill test runs is best for test authors.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-19 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Committed to Python 2.7 in revision 87406.

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-15 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

 I'd like to fix all these issues by moving the exception handling into a 
 single method and unifying the reporting of failure / error / expected 
 failure / skip test. This will fix all these issues and nicely simplify the 
 implementation.

That sounds good.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-10 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

At the moment exception handling for setUp / tearDown / testMethod and cleanUp 
functions are all handled separately. They all have to call addError and as a 
result we have inconsistent handling of skips, expected failures (etc). There 
are separate issues for handling expected failures in setUp and skips in 
tearDown.

I'd like to fix all these issues by moving the exception handling into a single 
method and unifying the reporting of failure / error / expected failure / skip 
test. This will fix all these issues and nicely simplify the implementation.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-09 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Agreed. I think the except Exception in TestCase.run() should be except 
BaseException, since BaseException could catch Exception, SystemExit, 
GeneratorExit, KeyboardInterrupt. The KeyboardInterrupt should be caught first. 
The remaining three is exactly what is needed.

Here is a patch I worked, with unittest.

--
keywords: +patch
nosy: +ysj.ray
Added file: http://bugs.python.org/file19994/issue_10611.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-09 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

LGTM.

--
stage: unit test needed - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-02 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
title: sys.exit() in a test causes the run to stp - sys.exit() in a test 
causes a test run to die

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10611] sys.exit() in a test causes a test run to die

2010-12-02 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10611
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com