[Python-checkins] r86449 - python/branches/py3k/Lib/test/test_cmath.py

mark.dickinson python-checkins at python.org
Sat Nov 13 11:43:40 CET 2010


Author: mark.dickinson
Date: Sat Nov 13 11:43:40 2010
New Revision: 86449

Log:
Streamline a cmath test (and fix some overlong lines into the bargain).

Modified:
   python/branches/py3k/Lib/test/test_cmath.py

Modified: python/branches/py3k/Lib/test/test_cmath.py
==============================================================================
--- python/branches/py3k/Lib/test/test_cmath.py	(original)
+++ python/branches/py3k/Lib/test/test_cmath.py	Sat Nov 13 11:43:40 2010
@@ -511,10 +511,8 @@
     @unittest.skipIf(sysconfig.get_config_var('TANH_PRESERVES_ZERO_SIGN') == 0,
                      "system tanh() function doesn't copy the sign")
     def testTanhSign(self):
-        self.assertComplexIdentical(cmath.tanh(complex(0., .0j)), complex(0., .0j))
-        self.assertComplexIdentical(cmath.tanh(complex(0., -.0j)), complex(0., -.0j))
-        self.assertComplexIdentical(cmath.tanh(complex(-0., .0j)), complex(-0., .0j))
-        self.assertComplexIdentical(cmath.tanh(complex(-0., -.0j)), complex(-0., -.0j))
+        for z in complex_zeros:
+            self.assertComplexIdentical(cmath.tanh(z), z)
 
 
 def test_main():


More information about the Python-checkins mailing list