]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix enum and backslash warnings (GH-25861) (GH-25871)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 4 May 2021 02:17:23 +0000 (19:17 -0700)
committerGitHub <noreply@github.com>
Tue, 4 May 2021 02:17:23 +0000 (19:17 -0700)
- Enum warning in test_faulthandler
- backslash warning in test_ipaddress
(cherry picked from commit 652bcd9f9cd2ed89b5fa958f8456556aa43b48cc)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Lib/test/test_faulthandler.py
Lib/test/test_ipaddress.py

index 648624482e5553c68e6eacfa9f18f466a9ae2508..29a70857930c1e414d6983914987a54070b9fcd0 100644 (file)
@@ -663,7 +663,7 @@ class FaultHandlerTests(unittest.TestCase):
             import sys
 
             all_threads = {all_threads}
-            signum = {signum}
+            signum = {signum:d}
             unregister = {unregister}
             chain = {chain}
             filename = {filename!r}
index cdd9880c3c17fafa7d140508e23a7915bf1ae147..90559ce1242c55d1588f6663ecdae33a49363842 100644 (file)
@@ -97,7 +97,7 @@ class CommonTestMixin_v4(CommonTestMixin):
 
     def test_leading_zeros(self):
         # bpo-36384: no leading zeros to avoid ambiguity with octal notation
-        msg = "Leading zeros are not permitted in '\d+'"
+        msg = "Leading zeros are not permitted in '\\d+'"
         addresses = [
             "000.000.000.000",
             "192.168.000.001",