Update test_robotparser from CPython 3.10.5
@@ -311,6 +311,9 @@ class RobotHandler(BaseHTTPRequestHandler):
class PasswordProtectedSiteTestCase(unittest.TestCase):
def setUp(self):
+ # clear _opener global variable
+ self.addCleanup(urllib.request.urlcleanup)
+
self.server = HTTPServer((socket_helper.HOST, 0), RobotHandler)
self.t = threading.Thread(
