[Python-checkins] cpython (2.7): Third attempt to fix test_user_command on OpenSolaris.

serhiy.storchaka python-checkins at python.org
Thu Jan 23 15:08:49 CET 2014


http://hg.python.org/cpython/rev/f28b60141c5c
changeset:   88655:f28b60141c5c
branch:      2.7
parent:      88653:3f8d0d68d30c
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Jan 23 16:08:35 2014 +0200
summary:
  Third attempt to fix test_user_command on OpenSolaris.

files:
  Lib/test/test_tcl.py |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -219,7 +219,9 @@
             self.assertIsInstance(r, str)
             eq(r, expected)
         def float_eq(actual, expected):
-            self.assertAlmostEqual(float(actual), float(expected))
+            expected = float(expected)
+            self.assertAlmostEqual(float(actual), expected,
+                                   delta=abs(expected) * 1e-10)
         def nan_eq(actual, expected):
             actual = float(actual)
             self.assertNotEqual(actual, actual)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list