[Python-checkins] r65803 - python/trunk/Lib/test/test_py3kwarn.py

benjamin.peterson python-checkins at python.org
Mon Aug 18 04:12:23 CEST 2008


Author: benjamin.peterson
Date: Mon Aug 18 04:12:23 2008
New Revision: 65803

Log:
add a test for reduce's move

Modified:
   python/trunk/Lib/test/test_py3kwarn.py

Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py	(original)
+++ python/trunk/Lib/test/test_py3kwarn.py	Mon Aug 18 04:12:23 2008
@@ -340,6 +340,12 @@
                 func = getattr(commands, name)
                 self.assertRaises(DeprecationWarning, func, *([None]*arg_count))
 
+    def test_reduce_move(self):
+        from operator import add
+        with catch_warning(record=False):
+            warnings.filterwarnings("error", "reduce")
+            self.assertRaises(DeprecationWarning, reduce, add, range(10))
+
     def test_mutablestring_removal(self):
         # UserString.MutableString has been removed in 3.0.
         import UserString


More information about the Python-checkins mailing list