fix enum and backslash warnings (GH-25861) (GH-25871)

- 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>
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 6486244..29a7085 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}