[New-bugs-announce] [issue30221] Deprecate assertNotAlmostEqual

Serhiy Storchaka report at bugs.python.org
Mon May 1 12:53:21 EDT 2017

New submission from Serhiy Storchaka:

The purpose of the assertNotAlmostEqual() method of TestCase is not clear. This method is never used in the CPython testsuite (except tests for it itself), it is never mentioned in the bug tracker (except one general issue about mass renaming methods in TestCase). I have found only one usage of assertNotAlmostEqual() which is not testing its itself on GitHub [1], and in that case it would be better to use assertAlmostEqual() with correct expected result instead.

It seems to me that assertNotAlmostEqual() was added just "for symmetry", and there are no real cases for it. Deprecating and following removing it will make the API simpler.

[1] https://github.com/BrechtDeVlieger/Altran_courses/blob/d983b30b4dc1eac6905a71209037ed082330f7fe/Python%20fundamentals/Day1/Functions/test_temperature_ori.py

components: Library (Lib)
messages: 292674
nosy: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Deprecate assertNotAlmostEqual
type: enhancement
versions: Python 3.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list