forked from pool/python312
Fix tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=117
This commit is contained in:
@@ -133,7 +133,7 @@ Index: Python-3.12.10/Lib/test/test_codeccallbacks.py
|
|||||||
Index: Python-3.12.10/Lib/test/test_codecs.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.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-17 12:00:10.380601754 +0000
|
+++ Python-3.12.10/Lib/test/test_codecs.py 2025-05-17 15:45:02.268254653 +0000
|
||||||
@@ -1196,23 +1196,39 @@
|
@@ -1196,23 +1196,39 @@
|
||||||
check(br"[\1010]", b"[A0]")
|
check(br"[\1010]", b"[A0]")
|
||||||
check(br"[\x41]", b"[A]")
|
check(br"[\x41]", b"[A]")
|
||||||
@@ -151,7 +151,7 @@ Index: Python-3.12.10/Lib/test/test_codecs.py
|
|||||||
check(b"\\" + b, b"\\" + b)
|
check(b"\\" + b, b"\\" + b)
|
||||||
- with self.assertWarns(DeprecationWarning):
|
- with self.assertWarns(DeprecationWarning):
|
||||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||||
+ r'"\\%c" is an invalid escape sequence' % (i-32)):
|
+ r"invalid escape sequence '\\%c'" % (i-32)):
|
||||||
check(b"\\" + b.upper(), b"\\" + b.upper())
|
check(b"\\" + b.upper(), b"\\" + b.upper())
|
||||||
- with self.assertWarns(DeprecationWarning):
|
- with self.assertWarns(DeprecationWarning):
|
||||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||||
@@ -197,7 +197,7 @@ Index: Python-3.12.10/Lib/test/test_codecs.py
|
|||||||
if b.upper() not in b'UN':
|
if b.upper() not in b'UN':
|
||||||
- with self.assertWarns(DeprecationWarning):
|
- with self.assertWarns(DeprecationWarning):
|
||||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||||
+ r'"\\%c" is an invalid escape sequence' % (i-32)):
|
+ r"invalid escape sequence '\\%c'" % (i-32)):
|
||||||
check(b"\\" + b.upper(), "\\" + chr(i-32))
|
check(b"\\" + b.upper(), "\\" + chr(i-32))
|
||||||
- with self.assertWarns(DeprecationWarning):
|
- with self.assertWarns(DeprecationWarning):
|
||||||
+ with self.assertWarnsRegex(DeprecationWarning,
|
+ with self.assertWarnsRegex(DeprecationWarning,
|
||||||
|
|||||||
Reference in New Issue
Block a user