diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index 55254b5c5e8..83184c32670 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -427,9 +427,9 @@ def test_no_stale_references(self): def test_max_workers_negative(self): for number in (0, -1): - with self.assertRaisesRegexp(ValueError, - "max_workers must be greater " - "than 0"): + with self.assertRaisesRegex(ValueError, + "max_workers must be greater " + "than 0"): self.executor_type(max_workers=number)