diff options
| author | Scott Talbert <swt@techie.net> | 2023-02-01 22:38:53 -0500 |
|---|---|---|
| committer | Scott Talbert <swt@techie.net> | 2023-02-01 22:38:53 -0500 |
| commit | dae602d37493bae239e0e8db5b3dabafebfd59db (patch) | |
| tree | b171991cbce2b1dbf6a313e8365bed80804ca6a8 /tests/test_popen_spawn.py | |
| parent | af88104d1a1e2b7c470f5ea74a6000995476e36a (diff) | |
| download | pexpect-dae602d37493bae239e0e8db5b3dabafebfd59db.tar.gz | |
tests: Replace assertRaisesRegexp with assertRaisesRegex
unittest.TestCase.assertRaisesRegexp was deprecated in Python 3.2 and is
removed in Python 3.12.
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): |
