diff options
author | Stefan Eßer <se@FreeBSD.org> | 2021-09-22 17:11:46 +0200 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2021-09-22 17:11:46 +0200 |
commit | b717990ac74691f2081f4ab0c63d8829db9e8fa1 (patch) | |
tree | a30d33c1a81233b404ce9323809a633584ba8e5c /tests/test_popen_spawn.py | |
parent | a48c3021c4c4cffc537122ac14d2c340ae75ad62 (diff) | |
download | pexpect-b717990ac74691f2081f4ab0c63d8829db9e8fa1.tar.gz |
Replace deprecated assertRaisesRegexp with assertRaisesRegex
The assertRaisesRegexp function appeared in Python-3.1 and was renamed
to assertRaisesRegex in Python-3.2.
Diffstat (limited to 'tests/test_popen_spawn.py')
-rw-r--r-- | tests/test_popen_spawn.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_popen_spawn.py b/tests/test_popen_spawn.py index fca7493..10d7032 100644 --- a/tests/test_popen_spawn.py +++ b/tests/test_popen_spawn.py @@ -110,13 +110,13 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase): def test_bad_arg(self): p = PopenSpawn('cat') - with self.assertRaisesRegexp(TypeError, '.*must be one of'): + with self.assertRaisesRegex(TypeError, '.*must be one of'): p.expect(1) - with self.assertRaisesRegexp(TypeError, '.*must be one of'): + with self.assertRaisesRegex(TypeError, '.*must be one of'): p.expect([1, b'2']) - with self.assertRaisesRegexp(TypeError, '.*must be one of'): + with self.assertRaisesRegex(TypeError, '.*must be one of'): p.expect_exact(1) - with self.assertRaisesRegexp(TypeError, '.*must be one of'): + with self.assertRaisesRegex(TypeError, '.*must be one of'): p.expect_exact([1, b'2']) def test_timeout_none(self): |