bpo-30978: str.format_map() now passes key lookup exceptions through. (#2790)
Previously any exception was replaced with a KeyError exception.
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 0ea5a20..e9c07a0 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -468,7 +468,7 @@
m[(0,)]
with self.assertRaisesRegex(IndexError, 'no such group'):
m[(0, 1)]
- with self.assertRaisesRegex(KeyError, 'a2'):
+ with self.assertRaisesRegex(IndexError, 'no such group'):
'a1={a2}'.format_map(m)
m = pat.match('ac')