[Python-checkins] cpython (3.2): Use non-deprecated method name.

ezio.melotti python-checkins at python.org
Wed Apr 20 20:59:32 CEST 2011


http://hg.python.org/cpython/rev/87f9519203f4
changeset:   69479:87f9519203f4
branch:      3.2
parent:      69477:a2a2882ce6b4
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Wed Apr 20 21:56:21 2011 +0300
summary:
  Use non-deprecated method name.

files:
  Lib/test/string_tests.py |  14 +++++++-------
  Lib/test/test_bytes.py   |  14 +++++++-------
  2 files changed, 14 insertions(+), 14 deletions(-)


diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -1225,19 +1225,19 @@
         # issue 11828
         s = 'hello'
         x = 'x'
-        self.assertRaisesRegexp(TypeError, r'^find\(', s.find,
+        self.assertRaisesRegex(TypeError, r'^find\(', s.find,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'^rfind\(', s.rfind,
+        self.assertRaisesRegex(TypeError, r'^rfind\(', s.rfind,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'^index\(', s.index,
+        self.assertRaisesRegex(TypeError, r'^index\(', s.index,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'^rindex\(', s.rindex,
+        self.assertRaisesRegex(TypeError, r'^rindex\(', s.rindex,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'^count\(', s.count,
+        self.assertRaisesRegex(TypeError, r'^count\(', s.count,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'^startswith\(', s.startswith,
+        self.assertRaisesRegex(TypeError, r'^startswith\(', s.startswith,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'^endswith\(', s.endswith,
+        self.assertRaisesRegex(TypeError, r'^endswith\(', s.endswith,
                                 x, None, None, None)
 
 
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -523,19 +523,19 @@
         # issue 11828
         b = self.type2test(b'hello')
         x = self.type2test(b'x')
-        self.assertRaisesRegexp(TypeError, r'\bfind\b', b.find,
+        self.assertRaisesRegex(TypeError, r'\bfind\b', b.find,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'\brfind\b', b.rfind,
+        self.assertRaisesRegex(TypeError, r'\brfind\b', b.rfind,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'\bindex\b', b.index,
+        self.assertRaisesRegex(TypeError, r'\bindex\b', b.index,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'\brindex\b', b.rindex,
+        self.assertRaisesRegex(TypeError, r'\brindex\b', b.rindex,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'\bcount\b', b.count,
+        self.assertRaisesRegex(TypeError, r'\bcount\b', b.count,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'\bstartswith\b', b.startswith,
+        self.assertRaisesRegex(TypeError, r'\bstartswith\b', b.startswith,
                                 x, None, None, None)
-        self.assertRaisesRegexp(TypeError, r'\bendswith\b', b.endswith,
+        self.assertRaisesRegex(TypeError, r'\bendswith\b', b.endswith,
                                 x, None, None, None)
 
 

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


More information about the Python-checkins mailing list