[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-11 Thread Michael Foord

Michael Foord  added the comment:

We aren't talking about *removing* these methods from unittest - but now that 
we have standardised on assertEqual for the Python test suite it is annoying 
(particularly for Ezio who changes) when *new* tests are checked in using the 
old (deprecated-but-not-actually-deprecated) methods.

As deprecation warnings are now silent by default deprecating these old methods 
would only affect developers who run their tests specifically looking for 
information like this. Making the change is also a single "search and replace" 
across a code-base, so not a difficult change.

Actually whether or not we deprecate these methods in unittest itself is one 
question (I'm only +0 on that - I don't really care if they live for ever in 
general and Raymond's response can be read as a strong +1 for that). What Ezio 
*really* wants is to have these methods raise errors if used during *regrtest* 
runs, so that core-Python developers no longer use them. That I am fine with - 
although we would need some way for the tests for these methods themselves to 
actually run.

--
assignee: rhettinger -> ezio.melotti
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

These synonyms have been around a very long time and many test suites have one 
or the other or both.  Nothing good can come from breaking those existing test 
suites.  We don't need to harm our users just to accommodate a stylistic 
preference.

--
assignee: ezio.melotti -> rhettinger
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-06 Thread Ezio Melotti

Ezio Melotti  added the comment:

If you are talking about assertNotEquals, assertAlmostEquals, and 
assertAlmostNotEquals they should go as well (I didn't even know they existed). 
assert_ is probably used more often, but I'd deprecate it too.
Note that in the 2.7 and 3.2 doc assert_ is already marked as deprecated, and 
the other methods are not documented.

The plan is:
 1) replace all the occurrences of assertEquals, assertNotEquals, 
assertAlmostEquals, assertAlmostNotEquals, assert_ in the Python test suite 
with assertEqual, assertNotEqual, assertAlmostEqual, assertAlmostNotEqual, 
assertTrue;
 2) deprecate assertEquals, assertNotEquals, assertAlmostEquals, 
assertAlmostNotEquals, assert_;
 3) patch regrtest.py to raise an error when these methods are used, in order 
to avoid that they sneak in again in the Python test suite.

--
stage:  -> needs patch

___
Python tracker 

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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

What about the other duplicate pairs with a preferred choice?
Is there too much use of the deprecated choice?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-07-29 Thread Michael Foord

New submission from Michael Foord :

Now that deprecations are silent by default it would be much less intrusive to 
deprecate unittest.TestCase.assertEqual

We have a persistent issue in the Python test suite of developers using 
assertEquals when we have standardised on assertEqual. In regrtest we could 
patch TestCase.assertEquals to raise a (hopefully helpful) error. That'll stop 
the blighters!

--
assignee: ezio.melotti
messages: 112025
nosy: ezio.melotti, michael.foord
priority: normal
severity: normal
status: open
title: deprecate unittest.TestCase.assertEquals
versions: Python 3.2

___
Python tracker 

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