[Python-checkins] fix enum and backslash warnings (GH-25861)
ethanfurman
webhook-mailer at python.org
Mon May 3 21:44:38 EDT 2021
https://github.com/python/cpython/commit/652bcd9f9cd2ed89b5fa958f8456556aa43b48cc
commit: 652bcd9f9cd2ed89b5fa958f8456556aa43b48cc
branch: main
author: Ethan Furman <ethan at stoneleaf.us>
committer: ethanfurman <ethan at stoneleaf.us>
date: 2021-05-03T18:44:30-07:00
summary:
fix enum and backslash warnings (GH-25861)
- Enum warning in test_faulthandler
- backslash warning in test_ipaddress
files:
M Lib/test/test_faulthandler.py
M Lib/test/test_ipaddress.py
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 648624482e555..29a70857930c1 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -663,7 +663,7 @@ def check_register(self, filename=False, all_threads=False,
import sys
all_threads = {all_threads}
- signum = {signum}
+ signum = {signum:d}
unregister = {unregister}
chain = {chain}
filename = {filename!r}
diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py
index cdd9880c3c17f..90559ce1242c5 100644
--- a/Lib/test/test_ipaddress.py
+++ b/Lib/test/test_ipaddress.py
@@ -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",
More information about the Python-checkins
mailing list