[issue27176] Addition of assertNotRaises

2016-06-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with David snd Steven, so closing this as rejected.

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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




[issue27176] Addition of assertNotRaises

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

Agreed.  I've never used the distinction between errors and failures myself.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Yes. What does such an assertion actually mean?

Why would I write `self.assertNotRaises(ValueError, spam, arg)` rather than 
just call `spam(arg)`? The only difference is that assertNotRaises will treat 
one specific exception as a test failure rather than a error, but I don't think 
that's useful. spam(arg) presumably is supposed to return something, or do 
something, not merely "don't raise ValueError". Raising ValueError should be no 
different from raising any other exception: it's a error, not a failure.

It makes sense to test for expected exceptions. I don't think it makes sense to 
test for exceptions that don't happen. Every single successful test of 
`spam(arg)` shows that ValueError is not raised, as well as every imaginable 
other exception. I don't think there is any need for an assert method to test 
for exceptions not being raised.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +ezio.melotti, michael.foord, rbcollins
versions: +Python 3.6

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread Bar Harel

New submission from Bar Harel:

I thought of implementing an assertNotRaises to solve the issue of using 
try...except...fail in order to prevent showing the tests as an error and 
instead show them as a failure.
Is there anything I should consider while implementing it?

--
components: Library (Lib), Tests
messages: 266816
nosy: bar.harel
priority: normal
severity: normal
status: open
title: Addition of assertNotRaises
type: enhancement

___
Python tracker 

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