[Python-checkins] cpython: Stop using the deprecated unittest.TestCase.assertRaisesRegexp()
brett.cannon
python-checkins at python.org
Sun Jun 16 17:38:30 CEST 2013
http://hg.python.org/cpython/rev/4f7c25ab2ed2
changeset: 84164:4f7c25ab2ed2
user: Brett Cannon <brett at python.org>
date: Sun Jun 16 11:37:57 2013 -0400
summary:
Stop using the deprecated unittest.TestCase.assertRaisesRegexp()
files:
Lib/test/test_source_encoding.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
--- a/Lib/test/test_source_encoding.py
+++ b/Lib/test/test_source_encoding.py
@@ -62,17 +62,17 @@
compile(b'# -*- coding: iso-8859-15 -*-\n', 'dummy', 'exec')
compile(b'\xef\xbb\xbf\n', 'dummy', 'exec')
compile(b'\xef\xbb\xbf# -*- coding: utf-8 -*-\n', 'dummy', 'exec')
- with self.assertRaisesRegexp(SyntaxError, 'fake'):
+ with self.assertRaisesRegex(SyntaxError, 'fake'):
compile(b'# -*- coding: fake -*-\n', 'dummy', 'exec')
- with self.assertRaisesRegexp(SyntaxError, 'iso-8859-15'):
+ with self.assertRaisesRegex(SyntaxError, 'iso-8859-15'):
compile(b'\xef\xbb\xbf# -*- coding: iso-8859-15 -*-\n',
'dummy', 'exec')
- with self.assertRaisesRegexp(SyntaxError, 'BOM'):
+ with self.assertRaisesRegex(SyntaxError, 'BOM'):
compile(b'\xef\xbb\xbf# -*- coding: iso-8859-15 -*-\n',
'dummy', 'exec')
- with self.assertRaisesRegexp(SyntaxError, 'fake'):
+ with self.assertRaisesRegex(SyntaxError, 'fake'):
compile(b'\xef\xbb\xbf# -*- coding: fake -*-\n', 'dummy', 'exec')
- with self.assertRaisesRegexp(SyntaxError, 'BOM'):
+ with self.assertRaisesRegex(SyntaxError, 'BOM'):
compile(b'\xef\xbb\xbf# -*- coding: fake -*-\n', 'dummy', 'exec')
def test_bad_coding(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list