summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_source_encoding.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-16 15:37:57 (GMT)
committerBrett Cannon <brett@python.org>2013-06-16 15:37:57 (GMT)
commit39295e7a55d03b9ef31c0d0dd27d129b1ad5a695 (patch)
tree72651fb985b21eec76f851ad3ce495f18b8b112f /Lib/test/test_source_encoding.py
parent2f9f056db132a66dcc9de452bf1e90969ae7c74d (diff)
downloadcpython-39295e7a55d03b9ef31c0d0dd27d129b1ad5a695.zip
cpython-39295e7a55d03b9ef31c0d0dd27d129b1ad5a695.tar.gz
cpython-39295e7a55d03b9ef31c0d0dd27d129b1ad5a695.tar.bz2
Stop using the deprecated unittest.TestCase.assertRaisesRegexp()
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r--Lib/test/test_source_encoding.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
index 0e539d5..c2faee1 100644
--- a/Lib/test/test_source_encoding.py
+++ b/Lib/test/test_source_encoding.py
@@ -62,17 +62,17 @@ class SourceEncodingTest(unittest.TestCase):
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):