[Python-Dev] fcmp() in test.support

Michael Foord fuzzyman at voidspace.org.uk
Fri Jan 28 20:34:12 CET 2011


On 28/01/2011 04:55, Eli Bendersky wrote:
> I'm working on improving the .rst documentation of test.support (Issue
> 11015), and came upon the undocumented "fcmp" function that's being
> exported from test.support, along with a "FUZZ"constant.
>

This module shouldn't really be documented at all. It exists to support 
the Python test framework and we don't want to have to support users or 
make API stability guarantees. Plus most of it is rather old. Please 
don't document more stuff in this module.

> As I search through the tests (py3k trunk), I see fcmp() is being used
> only in two places in a fairly trivial way:
> 1. test_float: where it can be directly replaced by assertAlmostEqual
> from unittest
> 2. test_builtin: where the assertion can also be easily rewritten in
> terms of assertAlmostEqual
>
> Although fcmp seems to provide extra functionality over
> assertAlmostEqual, the above makes me think it should probably be
> removed altogether, or added to unittest if it's still deemed
> important.
>
Yes, get rid of it.

Michael Foord

> +/- ?
> Eli
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


-- 
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html



More information about the Python-Dev mailing list