aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_xmlrpc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_xmlrpc.py')
-rw-r--r--Lib/test/test_xmlrpc.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 02d9f5c650c..f2fdc44cbe0 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -9,7 +9,6 @@ import xmlrpc.server
import http.client
import http, http.server
import socket
-import os
import re
import io
import contextlib
@@ -776,8 +775,8 @@ class SimpleServerTestCase(BaseServerTestCase):
# 'method "this_is_not_exists" is not supported'>}]
self.assertEqual(result.results[0]['faultCode'], 1)
- self.assertEqual(result.results[0]['faultString'],
- '<class \'Exception\'>:method "this_is_not_exists" '
+ self.assertRegex(result.results[0]['faultString'],
+ '<class \'Exception\' at 0x.+>:method "this_is_not_exists" '
'is not supported')
except (xmlrpclib.ProtocolError, OSError) as e:
# ignore failures due to non-blocking socket 'unavailable' errors
@@ -1147,7 +1146,6 @@ def captured_stdout(encoding='utf-8'):
"""A variation on support.captured_stdout() which gives a text stream
having a `buffer` attribute.
"""
- import io
orig_stdout = sys.stdout
sys.stdout = io.TextIOWrapper(io.BytesIO(), encoding=encoding)
try: