2025-05-19 00:49:25 +00:00
committed by Git OBS Bridge
parent e728127a90
commit f1df581bc1

View File

@@ -136,7 +136,7 @@ Index: Python-3.12.10/Lib/test/test_codeccallbacks.py
Index: Python-3.12.10/Lib/test/test_codecs.py
===================================================================
--- Python-3.12.10.orig/Lib/test/test_codecs.py 2025-05-17 12:00:00.357214034 +0000
+++ Python-3.12.10/Lib/test/test_codecs.py 2025-05-18 23:08:26.236672509 +0000
+++ Python-3.12.10/Lib/test/test_codecs.py 2025-05-19 00:48:39.370396727 +0000
@@ -1196,23 +1196,39 @@
check(br"[\1010]", b"[A0]")
check(br"[\x41]", b"[A]")
@@ -169,7 +169,7 @@ Index: Python-3.12.10/Lib/test/test_codecs.py
for i in range(0o400, 0o1000):
- with self.assertWarns(DeprecationWarning):
+ with self.assertWarnsRegex(DeprecationWarning,
+ r'"\\%o" is an invalid octal escape sequence' % i):
+ r'invalid octal escape sequence'):
check(rb'\%o' % i, bytes([i & 0o377]))
+ with self.assertWarnsRegex(DeprecationWarning,
@@ -204,18 +204,18 @@ Index: Python-3.12.10/Lib/test/test_codecs.py
check(b"\\" + b.upper(), "\\" + chr(i-32))
- with self.assertWarns(DeprecationWarning):
+ with self.assertWarnsRegex(DeprecationWarning,
+ r'"\\8" is an invalid escape sequence'):
+ r'invalid escape sequence'):
check(br"\8", "\\8")
with self.assertWarns(DeprecationWarning):
check(br"\9", "\\9")
- with self.assertWarns(DeprecationWarning):
+ with self.assertWarnsRegex(DeprecationWarning,
+ r'"\\\xfa" is an invalid escape sequence') as cm:
+ r'invalid escape sequence') as cm:
check(b"\\\xfa", "\\\xfa")
for i in range(0o400, 0o1000):
- with self.assertWarns(DeprecationWarning):
+ with self.assertWarnsRegex(DeprecationWarning,
+ r'"\\%o" is an invalid octal escape sequence' % i):
+ r'invalid octal escape sequence'):
check(rb'\%o' % i, chr(i))
+ with self.assertWarnsRegex(DeprecationWarning,