✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.254
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python312/lib64/python3.12/test//test_httpservers.py
"""Unittests for the various HTTPServer modules.

Written by Cody A.W. Somerville <cody-somerville@ubuntu.com>,
Josip Dzolonga, and Michael Otteneder for the 2007/08 GHOP contest.
"""
from collections import OrderedDict
from http.server import BaseHTTPRequestHandler, HTTPServer, \
     SimpleHTTPRequestHandler, CGIHTTPRequestHandler
from http import server, HTTPStatus

import os
import socket
import sys
import re
import base64
import ntpath
import pathlib
import shutil
import email.message
import email.utils
import html
import http, http.client
import urllib.parse
import tempfile
import time
import datetime
import threading
from unittest import mock
import warnings
from io import BytesIO, StringIO

import unittest
from test import support
from test.support import os_helper
from test.support import threading_helper

support.requires_working_socket(module=True)

class NoLogRequestHandler:
    def log_message(self, *args):
        # don't write log messages to stderr
        pass

    def read(self, n=None):
        return ''


class TestServerThread(threading.Thread):
    def __init__(self, test_object, request_handler):
        threading.Thread.__init__(self)
        self.request_handler = request_handler
        self.test_object = test_object

    def run(self):
        self.server = HTTPServer(('localhost', 0), self.request_handler)
        self.test_object.HOST, self.test_object.PORT = self.server.socket.getsockname()
        self.test_object.server_started.set()
        self.test_object = None
        try:
            self.server.serve_forever(0.05)
        finally:
            self.server.server_close()

    def stop(self):
        self.server.shutdown()
        self.join()


class BaseTestCase(unittest.TestCase):
    def setUp(self):
        self._threads = threading_helper.threading_setup()
        os.environ = os_helper.EnvironmentVarGuard()
        self.server_started = threading.Event()
        self.thread = TestServerThread(self, self.request_handler)
        self.thread.start()
        self.server_started.wait()

    def tearDown(self):
        self.thread.stop()
        self.thread = None
        os.environ.__exit__()
        threading_helper.threading_cleanup(*self._threads)

    def request(self, uri, method='GET', body=None, headers={}):
        self.connection = http.client.HTTPConnection(self.HOST, self.PORT)
        self.connection.request(method, uri, body, headers)
        return self.connection.getresponse()


class BaseHTTPServerTestCase(BaseTestCase):
    class request_handler(NoLogRequestHandler, BaseHTTPRequestHandler):
        protocol_version = 'HTTP/1.1'
        default_request_version = 'HTTP/1.1'

        def do_TEST(self):
            self.send_response(HTTPStatus.NO_CONTENT)
            self.send_header('Content-Type', 'text/html')
            self.send_header('Connection', 'close')
            self.end_headers()

        def do_KEEP(self):
            self.send_response(HTTPStatus.NO_CONTENT)
            self.send_header('Content-Type', 'text/html')
            self.send_header('Connection', 'keep-alive')
            self.end_headers()

        def do_KEYERROR(self):
            self.send_error(999)

        def do_NOTFOUND(self):
            self.send_error(HTTPStatus.NOT_FOUND)

        def do_EXPLAINERROR(self):
            self.send_error(999, "Short Message",
                            "This is a long \n explanation")

        def do_CUSTOM(self):
            self.send_response(999)
            self.send_header('Content-Type', 'text/html')
            self.send_header('Connection', 'close')
            self.end_headers()

        def do_LATINONEHEADER(self):
            self.send_response(999)
            self.send_header('X-Special', 'Dängerous Mind')
            self.send_header('Connection', 'close')
            self.end_headers()
            body = self.headers['x-special-incoming'].encode('utf-8')
            self.wfile.write(body)

        def do_SEND_ERROR(self):
            self.send_error(int(self.path[1:]))

        def do_HEAD(self):
            self.send_error(int(self.path[1:]))

    def setUp(self):
        BaseTestCase.setUp(self)
        self.con = http.client.HTTPConnection(self.HOST, self.PORT)
        self.con.connect()

    def test_command(self):
        self.con.request('GET', '/')
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)

    def test_request_line_trimming(self):
        self.con._http_vsn_str = 'HTTP/1.1\n'
        self.con.putrequest('XYZBOGUS', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)

    def test_version_bogus(self):
        self.con._http_vsn_str = 'FUBAR'
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_version_digits(self):
        self.con._http_vsn_str = 'HTTP/9.9.9'
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_version_signs_and_underscores(self):
        self.con._http_vsn_str = 'HTTP/-9_9_9.+9_9_9'
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_major_version_number_too_long(self):
        self.con._http_vsn_str = 'HTTP/909876543210.0'
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_minor_version_number_too_long(self):
        self.con._http_vsn_str = 'HTTP/1.909876543210'
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_version_none_get(self):
        self.con._http_vsn_str = ''
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)

    def test_version_none(self):
        # Test that a valid method is rejected when not HTTP/1.x
        self.con._http_vsn_str = ''
        self.con.putrequest('CUSTOM', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_version_invalid(self):
        self.con._http_vsn = 99
        self.con._http_vsn_str = 'HTTP/9.9'
        self.con.putrequest('GET', '/')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.HTTP_VERSION_NOT_SUPPORTED)

    def test_send_blank(self):
        self.con._http_vsn_str = ''
        self.con.putrequest('', '')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)

    def test_header_close(self):
        self.con.putrequest('GET', '/')
        self.con.putheader('Connection', 'close')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)

    def test_header_keep_alive(self):
        self.con._http_vsn_str = 'HTTP/1.1'
        self.con.putrequest('GET', '/')
        self.con.putheader('Connection', 'keep-alive')
        self.con.endheaders()
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)

    def test_handler(self):
        self.con.request('TEST', '/')
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NO_CONTENT)

    def test_return_header_keep_alive(self):
        self.con.request('KEEP', '/')
        res = self.con.getresponse()
        self.assertEqual(res.getheader('Connection'), 'keep-alive')
        self.con.request('TEST', '/')
        self.addCleanup(self.con.close)

    def test_internal_key_error(self):
        self.con.request('KEYERROR', '/')
        res = self.con.getresponse()
        self.assertEqual(res.status, 999)

    def test_return_custom_status(self):
        self.con.request('CUSTOM', '/')
        res = self.con.getresponse()
        self.assertEqual(res.status, 999)

    def test_return_explain_error(self):
        self.con.request('EXPLAINERROR', '/')
        res = self.con.getresponse()
        self.assertEqual(res.status, 999)
        self.assertTrue(int(res.getheader('Content-Length')))

    def test_latin1_header(self):
        self.con.request('LATINONEHEADER', '/', headers={
            'X-Special-Incoming':       'Ärger mit Unicode'
        })
        res = self.con.getresponse()
        self.assertEqual(res.getheader('X-Special'), 'Dängerous Mind')
        self.assertEqual(res.read(), 'Ärger mit Unicode'.encode('utf-8'))

    def test_error_content_length(self):
        # Issue #16088: standard error responses should have a content-length
        self.con.request('NOTFOUND', '/')
        res = self.con.getresponse()
        self.assertEqual(res.status, HTTPStatus.NOT_FOUND)

        data = res.read()
        self.assertEqual(int(res.getheader('Content-Length')), len(data))

    def test_send_error(self):
        allow_transfer_encoding_codes = (HTTPStatus.NOT_MODIFIED,
                                         HTTPStatus.RESET_CONTENT)
        for code in (HTTPStatus.NO_CONTENT, HTTPStatus.NOT_MODIFIED,
                     HTTPStatus.PROCESSING, HTTPStatus.RESET_CONTENT,
                     HTTPStatus.SWITCHING_PROTOCOLS):
            self.con.request('SEND_ERROR', '/{}'.format(code))
            res = self.con.getresponse()
            self.assertEqual(code, res.status)
            self.assertEqual(None, res.getheader('Content-Length'))
            self.assertEqual(None, res.getheader('Content-Type'))
            if code not in allow_transfer_encoding_codes:
                self.assertEqual(None, res.getheader('Transfer-Encoding'))

            data = res.read()
            self.assertEqual(b'', data)

    def test_head_via_send_error(self):
        allow_transfer_encoding_codes = (HTTPStatus.NOT_MODIFIED,
                                         HTTPStatus.RESET_CONTENT)
        for code in (HTTPStatus.OK, HTTPStatus.NO_CONTENT,
                     HTTPStatus.NOT_MODIFIED, HTTPStatus.RESET_CONTENT,
                     HTTPStatus.SWITCHING_PROTOCOLS):
            self.con.request('HEAD', '/{}'.format(code))
            res = self.con.getresponse()
            self.assertEqual(code, res.status)
            if code == HTTPStatus.OK:
                self.assertTrue(int(res.getheader('Content-Length')) > 0)
                self.assertIn('text/html', res.getheader('Content-Type'))
            else:
                self.assertEqual(None, res.getheader('Content-Length'))
                self.assertEqual(None, res.getheader('Content-Type'))
            if code not in allow_transfer_encoding_codes:
                self.assertEqual(None, res.getheader('Transfer-Encoding'))

            data = res.read()
            self.assertEqual(b'', data)


class RequestHandlerLoggingTestCase(BaseTestCase):
    class request_handler(BaseHTTPRequestHandler):
        protocol_version = 'HTTP/1.1'
        default_request_version = 'HTTP/1.1'

        def do_GET(self):
            self.send_response(HTTPStatus.OK)
            self.end_headers()

        def do_ERROR(self):
            self.send_error(HTTPStatus.NOT_FOUND, 'File not found')

    def test_get(self):
        self.con = http.client.HTTPConnection(self.HOST, self.PORT)
        self.con.connect()

        with support.captured_stderr() as err:
            self.con.request('GET', '/')
            self.con.getresponse()

        self.assertTrue(
            err.getvalue().endswith('"GET / HTTP/1.1" 200 -\n'))

    def test_err(self):
        self.con = http.client.HTTPConnection(self.HOST, self.PORT)
        self.con.connect()

        with support.captured_stderr() as err:
            self.con.request('ERROR', '/')
            self.con.getresponse()

        lines = err.getvalue().split('\n')
        self.assertTrue(lines[0].endswith('code 404, message File not found'))
        self.assertTrue(lines[1].endswith('"ERROR / HTTP/1.1" 404 -'))


class SimpleHTTPServerTestCase(BaseTestCase):
    class request_handler(NoLogRequestHandler, SimpleHTTPRequestHandler):
        pass

    def setUp(self):
        super().setUp()
        self.cwd = os.getcwd()
        basetempdir = tempfile.gettempdir()
        os.chdir(basetempdir)
        self.data = b'We are the knights who say Ni!'
        self.tempdir = tempfile.mkdtemp(dir=basetempdir)
        self.tempdir_name = os.path.basename(self.tempdir)
        self.base_url = '/' + self.tempdir_name
        tempname = os.path.join(self.tempdir, 'test')
        with open(tempname, 'wb') as temp:
            temp.write(self.data)
            temp.flush()
        mtime = os.stat(tempname).st_mtime
        # compute last modification datetime for browser cache tests
        last_modif = datetime.datetime.fromtimestamp(mtime,
            datetime.timezone.utc)
        self.last_modif_datetime = last_modif.replace(microsecond=0)
        self.last_modif_header = email.utils.formatdate(
            last_modif.timestamp(), usegmt=True)

    def tearDown(self):
        try:
            os.chdir(self.cwd)
            try:
                shutil.rmtree(self.tempdir)
            except:
                pass
        finally:
            super().tearDown()

    def check_status_and_reason(self, response, status, data=None):
        def close_conn():
            """Don't close reader yet so we can check if there was leftover
            buffered input"""
            nonlocal reader
            reader = response.fp
            response.fp = None
        reader = None
        response._close_conn = close_conn

        body = response.read()
        self.assertTrue(response)
        self.assertEqual(response.status, status)
        self.assertIsNotNone(response.reason)
        if data:
            self.assertEqual(data, body)
        # Ensure the server has not set up a persistent connection, and has
        # not sent any extra data
        self.assertEqual(response.version, 10)
        self.assertEqual(response.msg.get("Connection", "close"), "close")
        self.assertEqual(reader.read(30), b'', 'Connection should be closed')

        reader.close()
        return body

    @unittest.skipIf(sys.platform == 'darwin',
                     'undecodable name cannot always be decoded on macOS')
    @unittest.skipIf(sys.platform == 'win32',
                     'undecodable name cannot be decoded on win32')
    @unittest.skipUnless(os_helper.TESTFN_UNDECODABLE,
                         'need os_helper.TESTFN_UNDECODABLE')
    def test_undecodable_filename(self):
        enc = sys.getfilesystemencoding()
        filename = os.fsdecode(os_helper.TESTFN_UNDECODABLE) + '.txt'
        with open(os.path.join(self.tempdir, filename), 'wb') as f:
            f.write(os_helper.TESTFN_UNDECODABLE)
        response = self.request(self.base_url + '/')
        if sys.platform == 'darwin':
            # On Mac OS the HFS+ filesystem replaces bytes that aren't valid
            # UTF-8 into a percent-encoded value.
            for name in os.listdir(self.tempdir):
                if name != 'test': # Ignore a filename created in setUp().
                    filename = name
                    break
        body = self.check_status_and_reason(response, HTTPStatus.OK)
        quotedname = urllib.parse.quote(filename, errors='surrogatepass')
        self.assertIn(('href="%s"' % quotedname)
                      .encode(enc, 'surrogateescape'), body)
        self.assertIn(('>%s<' % html.escape(filename, quote=False))
                      .encode(enc, 'surrogateescape'), body)
        response = self.request(self.base_url + '/' + quotedname)
        self.check_status_and_reason(response, HTTPStatus.OK,
                                     data=os_helper.TESTFN_UNDECODABLE)

    def test_undecodable_parameter(self):
        # sanity check using a valid parameter
        response = self.request(self.base_url + '/?x=123').read()
        self.assertRegex(response, rf'listing for {self.base_url}/\?x=123'.encode('latin1'))
        # now the bogus encoding
        response = self.request(self.base_url + '/?x=%bb').read()
        self.assertRegex(response, rf'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))

    def test_get_dir_redirect_location_domain_injection_bug(self):
        """Ensure //evil.co/..%2f../../X does not put //evil.co/ in Location.

        //netloc/ in a Location header is a redirect to a new host.
        https://github.com/python/cpython/issues/87389

        This checks that a path resolving to a directory on our server cannot
        resolve into a redirect to another server.
        """
        os.mkdir(os.path.join(self.tempdir, 'existing_directory'))
        url = f'/python.org/..%2f..%2f..%2f..%2f..%2f../%0a%0d/../{self.tempdir_name}/existing_directory'
        expected_location = f'{url}/'  # /python.org.../ single slash single prefix, trailing slash
        # Canonicalizes to /tmp/tempdir_name/existing_directory which does
        # exist and is a dir, triggering the 301 redirect logic.
        response = self.request(url)
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        location = response.getheader('Location')
        self.assertEqual(location, expected_location, msg='non-attack failed!')

        # //python.org... multi-slash prefix, no trailing slash
        attack_url = f'/{url}'
        response = self.request(attack_url)
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        location = response.getheader('Location')
        self.assertFalse(location.startswith('//'), msg=location)
        self.assertEqual(location, expected_location,
                msg='Expected Location header to start with a single / and '
                'end with a / as this is a directory redirect.')

        # ///python.org... triple-slash prefix, no trailing slash
        attack3_url = f'//{url}'
        response = self.request(attack3_url)
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        self.assertEqual(response.getheader('Location'), expected_location)

        # If the second word in the http request (Request-URI for the http
        # method) is a full URI, we don't worry about it, as that'll be parsed
        # and reassembled as a full URI within BaseHTTPRequestHandler.send_head
        # so no errant scheme-less //netloc//evil.co/ domain mixup can happen.
        attack_scheme_netloc_2slash_url = f'https://pypi.org/{url}'
        expected_scheme_netloc_location = f'{attack_scheme_netloc_2slash_url}/'
        response = self.request(attack_scheme_netloc_2slash_url)
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        location = response.getheader('Location')
        # We're just ensuring that the scheme and domain make it through, if
        # there are or aren't multiple slashes at the start of the path that
        # follows that isn't important in this Location: header.
        self.assertTrue(location.startswith('https://pypi.org/'), msg=location)

    def test_get(self):
        #constructs the path relative to the root directory of the HTTPServer
        response = self.request(self.base_url + '/test')
        self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
        # check for trailing "/" which should return 404. See Issue17324
        response = self.request(self.base_url + '/test/')
        self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
        response = self.request(self.base_url + '/')
        self.check_status_and_reason(response, HTTPStatus.OK)
        response = self.request(self.base_url)
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        self.assertEqual(response.getheader("Content-Length"), "0")
        response = self.request(self.base_url + '/?hi=2')
        self.check_status_and_reason(response, HTTPStatus.OK)
        response = self.request(self.base_url + '?hi=1')
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        self.assertEqual(response.getheader("Location"),
                         self.base_url + "/?hi=1")
        response = self.request('/ThisDoesNotExist')
        self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
        response = self.request('/' + 'ThisDoesNotExist' + '/')
        self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
        os.makedirs(os.path.join(self.tempdir, 'spam', 'index.html'))
        response = self.request(self.base_url + '/spam/')
        self.check_status_and_reason(response, HTTPStatus.OK)

        data = b"Dummy index file\r\n"
        with open(os.path.join(self.tempdir_name, 'index.html'), 'wb') as f:
            f.write(data)
        response = self.request(self.base_url + '/')
        self.check_status_and_reason(response, HTTPStatus.OK, data)

        # chmod() doesn't work as expected on Windows, and filesystem
        # permissions are ignored by root on Unix.
        if os.name == 'posix' and os.geteuid() != 0:
            os.chmod(self.tempdir, 0)
            try:
                response = self.request(self.base_url + '/')
                self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
            finally:
                os.chmod(self.tempdir, 0o755)

    def test_head(self):
        response = self.request(
            self.base_url + '/test', method='HEAD')
        self.check_status_and_reason(response, HTTPStatus.OK)
        self.assertEqual(response.getheader('content-length'),
                         str(len(self.data)))
        self.assertEqual(response.getheader('content-type'),
                         'application/octet-stream')

    def test_browser_cache(self):
        """Check that when a request to /test is sent with the request header
        If-Modified-Since set to date of last modification, the server returns
        status code 304, not 200
        """
        headers = email.message.Message()
        headers['If-Modified-Since'] = self.last_modif_header
        response = self.request(self.base_url + '/test', headers=headers)
        self.check_status_and_reason(response, HTTPStatus.NOT_MODIFIED)

        # one hour after last modification : must return 304
        new_dt = self.last_modif_datetime + datetime.timedelta(hours=1)
        headers = email.message.Message()
        headers['If-Modified-Since'] = email.utils.format_datetime(new_dt,
            usegmt=True)
        response = self.request(self.base_url + '/test', headers=headers)
        self.check_status_and_reason(response, HTTPStatus.NOT_MODIFIED)

    def test_browser_cache_file_changed(self):
        # with If-Modified-Since earlier than Last-Modified, must return 200
        dt = self.last_modif_datetime
        # build datetime object : 365 days before last modification
        old_dt = dt - datetime.timedelta(days=365)
        headers = email.message.Message()
        headers['If-Modified-Since'] = email.utils.format_datetime(old_dt,
            usegmt=True)
        response = self.request(self.base_url + '/test', headers=headers)
        self.check_status_and_reason(response, HTTPStatus.OK)

    def test_browser_cache_with_If_None_Match_header(self):
        # if If-None-Match header is present, ignore If-Modified-Since

        headers = email.message.Message()
        headers['If-Modified-Since'] = self.last_modif_header
        headers['If-None-Match'] = "*"
        response = self.request(self.base_url + '/test', headers=headers)
        self.check_status_and_reason(response, HTTPStatus.OK)

    def test_invalid_requests(self):
        response = self.request('/', method='FOO')
        self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
        # requests must be case sensitive,so this should fail too
        response = self.request('/', method='custom')
        self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
        response = self.request('/', method='GETs')
        self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)

    def test_last_modified(self):
        """Checks that the datetime returned in Last-Modified response header
        is the actual datetime of last modification, rounded to the second
        """
        response = self.request(self.base_url + '/test')
        self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
        last_modif_header = response.headers['Last-modified']
        self.assertEqual(last_modif_header, self.last_modif_header)

    def test_path_without_leading_slash(self):
        response = self.request(self.tempdir_name + '/test')
        self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
        response = self.request(self.tempdir_name + '/test/')
        self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
        response = self.request(self.tempdir_name + '/')
        self.check_status_and_reason(response, HTTPStatus.OK)
        response = self.request(self.tempdir_name)
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        response = self.request(self.tempdir_name + '/?hi=2')
        self.check_status_and_reason(response, HTTPStatus.OK)
        response = self.request(self.tempdir_name + '?hi=1')
        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
        self.assertEqual(response.getheader("Location"),
                         self.tempdir_name + "/?hi=1")

    def test_html_escape_filename(self):
        filename = '<test&>.txt'
        fullpath = os.path.join(self.tempdir, filename)

        try:
            open(fullpath, 'wb').close()
        except OSError:
            raise unittest.SkipTest('Can not create file %s on current file '
                                    'system' % filename)

        try:
            response = self.request(self.base_url + '/')
            body = self.check_status_and_reason(response, HTTPStatus.OK)
            enc = response.headers.get_content_charset()
        finally:
            os.unlink(fullpath)  # avoid affecting test_undecodable_filename

        self.assertIsNotNone(enc)
        html_text = '>%s<' % html.escape(filename, quote=False)
        self.assertIn(html_text.encode(enc), body)


cgi_file1 = """\
#!%s

print("Content-type: text/html")
print()
print("Hello World")
"""

cgi_file2 = """\
#!%s
import os
import sys
import urllib.parse

print("Content-type: text/html")
print()

content_length = int(os.environ["CONTENT_LENGTH"])
query_string = sys.stdin.buffer.read(content_length)
params = {key.decode("utf-8"): val.decode("utf-8")
            for key, val in urllib.parse.parse_qsl(query_string)}

print("%%s, %%s, %%s" %% (params["spam"], params["eggs"], params["bacon"]))
"""

cgi_file4 = """\
#!%s
import os

print("Content-type: text/html")
print()

print(os.environ["%s"])
"""

cgi_file6 = """\
#!%s
import os

print("X-ambv: was here")
print("Content-type: text/html")
print()
print("<pre>")
for k, v in os.environ.items():
    try:
        k.encode('ascii')
        v.encode('ascii')
    except UnicodeEncodeError:
        continue  # see: BPO-44647
    print(f"{k}={v}")
print("</pre>")
"""

cgi_file7 = """\
#!%s
import os
import sys

print("Content-type: text/plain")
print()

content_length = int(os.environ["CONTENT_LENGTH"])
body = sys.stdin.buffer.read(content_length)

print(f"{content_length} {len(body)}")
"""


@unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
        "This test can't be run reliably as root (issue #13308).")
class CGIHTTPServerTestCase(BaseTestCase):
    class request_handler(NoLogRequestHandler, CGIHTTPRequestHandler):
        def run_cgi(self):
            # Silence the threading + fork DeprecationWarning this causes.
            # gh-109096: This is deprecated in 3.13 to go away in 3.15.
            with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
                return super().run_cgi()

    linesep = os.linesep.encode('ascii')

    def setUp(self):
        BaseTestCase.setUp(self)
        self.cwd = os.getcwd()
        self.parent_dir = tempfile.mkdtemp()
        self.cgi_dir = os.path.join(self.parent_dir, 'cgi-bin')
        self.cgi_child_dir = os.path.join(self.cgi_dir, 'child-dir')
        self.sub_dir_1 = os.path.join(self.parent_dir, 'sub')
        self.sub_dir_2 = os.path.join(self.sub_dir_1, 'dir')
        self.cgi_dir_in_sub_dir = os.path.join(self.sub_dir_2, 'cgi-bin')
        os.mkdir(self.cgi_dir)
        os.mkdir(self.cgi_child_dir)
        os.mkdir(self.sub_dir_1)
        os.mkdir(self.sub_dir_2)
        os.mkdir(self.cgi_dir_in_sub_dir)
        self.nocgi_path = None
        self.file1_path = None
        self.file2_path = None
        self.file3_path = None
        self.file4_path = None
        self.file5_path = None
        self.file6_path = None
        self.file7_path = None

        # The shebang line should be pure ASCII: use symlink if possible.
        # See issue #7668.
        self._pythonexe_symlink = None
        if os_helper.can_symlink():
            self.pythonexe = os.path.join(self.parent_dir, 'python')
            self._pythonexe_symlink = support.PythonSymlink(self.pythonexe).__enter__()
        else:
            self.pythonexe = sys.executable

        try:
            # The python executable path is written as the first line of the
            # CGI Python script. The encoding cookie cannot be used, and so the
            # path should be encodable to the default script encoding (utf-8)
            self.pythonexe.encode('utf-8')
        except UnicodeEncodeError:
            self.tearDown()
            self.skipTest("Python executable path is not encodable to utf-8")

        self.nocgi_path = os.path.join(self.parent_dir, 'nocgi.py')
        with open(self.nocgi_path, 'w', encoding='utf-8') as fp:
            fp.write(cgi_file1 % self.pythonexe)
        os.chmod(self.nocgi_path, 0o777)

        self.file1_path = os.path.join(self.cgi_dir, 'file1.py')
        with open(self.file1_path, 'w', encoding='utf-8') as file1:
            file1.write(cgi_file1 % self.pythonexe)
        os.chmod(self.file1_path, 0o777)

        self.file2_path = os.path.join(self.cgi_dir, 'file2.py')
        with open(self.file2_path, 'w', encoding='utf-8') as file2:
            file2.write(cgi_file2 % self.pythonexe)
        os.chmod(self.file2_path, 0o777)

        self.file3_path = os.path.join(self.cgi_child_dir, 'file3.py')
        with open(self.file3_path, 'w', encoding='utf-8') as file3:
            file3.write(cgi_file1 % self.pythonexe)
        os.chmod(self.file3_path, 0o777)

        self.file4_path = os.path.join(self.cgi_dir, 'file4.py')
        with open(self.file4_path, 'w', encoding='utf-8') as file4:
            file4.write(cgi_file4 % (self.pythonexe, 'QUERY_STRING'))
        os.chmod(self.file4_path, 0o777)

        self.file5_path = os.path.join(self.cgi_dir_in_sub_dir, 'file5.py')
        with open(self.file5_path, 'w', encoding='utf-8') as file5:
            file5.write(cgi_file1 % self.pythonexe)
        os.chmod(self.file5_path, 0o777)

        self.file6_path = os.path.join(self.cgi_dir, 'file6.py')
        with open(self.file6_path, 'w', encoding='utf-8') as file6:
            file6.write(cgi_file6 % self.pythonexe)
        os.chmod(self.file6_path, 0o777)

        self.file7_path = os.path.join(self.cgi_dir, 'file7.py')
        with open(self.file7_path, 'w', encoding='utf-8') as file7:
            file7.write(cgi_file7 % self.pythonexe)
        os.chmod(self.file7_path, 0o777)

        os.chdir(self.parent_dir)

    def tearDown(self):
        try:
            os.chdir(self.cwd)
            if self._pythonexe_symlink:
                self._pythonexe_symlink.__exit__(None, None, None)
            if self.nocgi_path:
                os.remove(self.nocgi_path)
            if self.file1_path:
                os.remove(self.file1_path)
            if self.file2_path:
                os.remove(self.file2_path)
            if self.file3_path:
                os.remove(self.file3_path)
            if self.file4_path:
                os.remove(self.file4_path)
            if self.file5_path:
                os.remove(self.file5_path)
            if self.file6_path:
                os.remove(self.file6_path)
            if self.file7_path:
                os.remove(self.file7_path)
            os.rmdir(self.cgi_child_dir)
            os.rmdir(self.cgi_dir)
            os.rmdir(self.cgi_dir_in_sub_dir)
            os.rmdir(self.sub_dir_2)
            os.rmdir(self.sub_dir_1)
            # The 'gmon.out' file can be written in the current working
            # directory if C-level code profiling with gprof is enabled.
            os_helper.unlink(os.path.join(self.parent_dir, 'gmon.out'))
            os.rmdir(self.parent_dir)
        finally:
            BaseTestCase.tearDown(self)

    def test_url_collapse_path(self):
        # verify tail is the last portion and head is the rest on proper urls
        test_vectors = {
            '': '//',
            '..': IndexError,
            '/.//..': IndexError,
            '/': '//',
            '//': '//',
            '/\\': '//\\',
            '/.//': '//',
            'cgi-bin/file1.py': '/cgi-bin/file1.py',
            '/cgi-bin/file1.py': '/cgi-bin/file1.py',
            'a': '//a',
            '/a': '//a',
            '//a': '//a',
            './a': '//a',
            './C:/': '/C:/',
            '/a/b': '/a/b',
            '/a/b/': '/a/b/',
            '/a/b/.': '/a/b/',
            '/a/b/c/..': '/a/b/',
            '/a/b/c/../d': '/a/b/d',
            '/a/b/c/../d/e/../f': '/a/b/d/f',
            '/a/b/c/../d/e/../../f': '/a/b/f',
            '/a/b/c/../d/e/.././././..//f': '/a/b/f',
            '../a/b/c/../d/e/.././././..//f': IndexError,
            '/a/b/c/../d/e/../../../f': '/a/f',
            '/a/b/c/../d/e/../../../../f': '//f',
            '/a/b/c/../d/e/../../../../../f': IndexError,
            '/a/b/c/../d/e/../../../../f/..': '//',
            '/a/b/c/../d/e/../../../../f/../.': '//',
        }
        for path, expected in test_vectors.items():
            if isinstance(expected, type) and issubclass(expected, Exception):
                self.assertRaises(expected,
                                  server._url_collapse_path, path)
            else:
                actual = server._url_collapse_path(path)
                self.assertEqual(expected, actual,
                                 msg='path = %r\nGot:    %r\nWanted: %r' %
                                 (path, actual, expected))

    def test_headers_and_content(self):
        res = self.request('/cgi-bin/file1.py')
        self.assertEqual(
            (res.read(), res.getheader('Content-type'), res.status),
            (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK))

    def test_issue19435(self):
        res = self.request('///////////nocgi.py/../cgi-bin/nothere.sh')
        self.assertEqual(res.status, HTTPStatus.NOT_FOUND)

    def test_post(self):
        params = urllib.parse.urlencode(
            {'spam' : 1, 'eggs' : 'python', 'bacon' : 123456})
        headers = {'Content-type' : 'application/x-www-form-urlencoded'}
        res = self.request('/cgi-bin/file2.py', 'POST', params, headers)

        self.assertEqual(res.read(), b'1, python, 123456' + self.linesep)

    def test_large_content_length(self):
        for w in range(15, 25):
            size = 1 << w
            body = b'X' * size
            headers = {'Content-Length' : str(size)}
            res = self.request('/cgi-bin/file7.py', 'POST', body, headers)
            self.assertEqual(res.read(), b'%d %d' % (size, size) + self.linesep)

    def test_large_content_length_truncated(self):
        with support.swap_attr(self.request_handler, 'timeout', 0.001):
            for w in range(18, 65):
                size = 1 << w
                headers = {'Content-Length' : str(size)}
                res = self.request('/cgi-bin/file1.py', 'POST', b'x', headers)
                self.assertEqual(res.read(), b'Hello World' + self.linesep)

    def test_invaliduri(self):
        res = self.request('/cgi-bin/invalid')
        res.read()
        self.assertEqual(res.status, HTTPStatus.NOT_FOUND)

    def test_authorization(self):
        headers = {b'Authorization' : b'Basic ' +
                   base64.b64encode(b'username:pass')}
        res = self.request('/cgi-bin/file1.py', 'GET', headers=headers)
        self.assertEqual(
            (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))

    def test_no_leading_slash(self):
        # http://bugs.python.org/issue2254
        res = self.request('cgi-bin/file1.py')
        self.assertEqual(
            (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))

    def test_os_environ_is_not_altered(self):
        signature = "Test CGI Server"
        os.environ['SERVER_SOFTWARE'] = signature
        res = self.request('/cgi-bin/file1.py')
        self.assertEqual(
            (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))
        self.assertEqual(os.environ['SERVER_SOFTWARE'], signature)

    def test_urlquote_decoding_in_cgi_check(self):
        res = self.request('/cgi-bin%2ffile1.py')
        self.assertEqual(
            (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))

    def test_nested_cgi_path_issue21323(self):
        res = self.request('/cgi-bin/child-dir/file3.py')
        self.assertEqual(
            (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))

    def test_query_with_multiple_question_mark(self):
        res = self.request('/cgi-bin/file4.py?a=b?c=d')
        self.assertEqual(
            (b'a=b?c=d' + self.linesep, 'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))

    def test_query_with_continuous_slashes(self):
        res = self.request('/cgi-bin/file4.py?k=aa%2F%2Fbb&//q//p//=//a//b//')
        self.assertEqual(
            (b'k=aa%2F%2Fbb&//q//p//=//a//b//' + self.linesep,
             'text/html', HTTPStatus.OK),
            (res.read(), res.getheader('Content-type'), res.status))

    def test_cgi_path_in_sub_directories(self):
        try:
            CGIHTTPRequestHandler.cgi_directories.append('/sub/dir/cgi-bin')
            res = self.request('/sub/dir/cgi-bin/file5.py')
            self.assertEqual(
                (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
                (res.read(), res.getheader('Content-type'), res.status))
        finally:
            CGIHTTPRequestHandler.cgi_directories.remove('/sub/dir/cgi-bin')

    def test_accept(self):
        browser_accept = \
                    'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
        tests = (
            ((('Accept', browser_accept),), browser_accept),
            ((), ''),
            # Hack case to get two values for the one header
            ((('Accept', 'text/html'), ('ACCEPT', 'text/plain')),
               'text/html,text/plain'),
        )
        for headers, expected in tests:
            headers = OrderedDict(headers)
            with self.subTest(headers):
                res = self.request('/cgi-bin/file6.py', 'GET', headers=headers)
                self.assertEqual(http.HTTPStatus.OK, res.status)
                expected = f"HTTP_ACCEPT={expected}".encode('ascii')
                self.assertIn(expected, res.read())


class SocketlessRequestHandler(SimpleHTTPRequestHandler):
    def __init__(self, directory=None):
        request = mock.Mock()
        request.makefile.return_value = BytesIO()
        super().__init__(request, None, None, directory=directory)

        self.get_called = False
        self.protocol_version = "HTTP/1.1"

    def do_GET(self):
        self.get_called = True
        self.send_response(HTTPStatus.OK)
        self.send_header('Content-Type', 'text/html')
        self.end_headers()
        self.wfile.write(b'<html><body>Data</body></html>\r\n')

    def log_message(self, format, *args):
        pass

class RejectingSocketlessRequestHandler(SocketlessRequestHandler):
    def handle_expect_100(self):
        self.send_error(HTTPStatus.EXPECTATION_FAILED)
        return False


class AuditableBytesIO:

    def __init__(self):
        self.datas = []

    def write(self, data):
        self.datas.append(data)

    def getData(self):
        return b''.join(self.datas)

    @property
    def numWrites(self):
        return len(self.datas)


class BaseHTTPRequestHandlerTestCase(unittest.TestCase):
    """Test the functionality of the BaseHTTPServer.

       Test the support for the Expect 100-continue header.
       """

    HTTPResponseMatch = re.compile(b'HTTP/1.[0-9]+ 200 OK')

    def setUp (self):
        self.handler = SocketlessRequestHandler()

    def send_typical_request(self, message):
        input = BytesIO(message)
        output = BytesIO()
        self.handler.rfile = input
        self.handler.wfile = output
        self.handler.handle_one_request()
        output.seek(0)
        return output.readlines()

    def verify_get_called(self):
        self.assertTrue(self.handler.get_called)

    def verify_expected_headers(self, headers):
        for fieldName in b'Server: ', b'Date: ', b'Content-Type: ':
            self.assertEqual(sum(h.startswith(fieldName) for h in headers), 1)

    def verify_http_server_response(self, response):
        match = self.HTTPResponseMatch.search(response)
        self.assertIsNotNone(match)

    def test_unprintable_not_logged(self):
        # We call the method from the class directly as our Socketless
        # Handler subclass overrode it... nice for everything BUT this test.
        self.handler.client_address = ('127.0.0.1', 1337)
        log_message = BaseHTTPRequestHandler.log_message
        with mock.patch.object(sys, 'stderr', StringIO()) as fake_stderr:
            log_message(self.handler, '/foo')
            log_message(self.handler, '/\033bar\000\033')
            log_message(self.handler, '/spam %s.', 'a')
            log_message(self.handler, '/spam %s.', '\033\x7f\x9f\xa0beans')
            log_message(self.handler, '"GET /foo\\b"ar\007 HTTP/1.0"')
        stderr = fake_stderr.getvalue()
        self.assertNotIn('\033', stderr)  # non-printable chars are caught.
        self.assertNotIn('\000', stderr)  # non-printable chars are caught.
        lines = stderr.splitlines()
        self.assertIn('/foo', lines[0])
        self.assertIn(r'/\x1bbar\x00\x1b', lines[1])
        self.assertIn('/spam a.', lines[2])
        self.assertIn('/spam \\x1b\\x7f\\x9f\xa0beans.', lines[3])
        self.assertIn(r'"GET /foo\\b"ar\x07 HTTP/1.0"', lines[4])

    def test_http_1_1(self):
        result = self.send_typical_request(b'GET / HTTP/1.1\r\n\r\n')
        self.verify_http_server_response(result[0])
        self.verify_expected_headers(result[1:-1])
        self.verify_get_called()
        self.assertEqual(result[-1], b'<html><body>Data</body></html>\r\n')
        self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1')
        self.assertEqual(self.handler.command, 'GET')
        self.assertEqual(self.handler.path, '/')
        self.assertEqual(self.handler.request_version, 'HTTP/1.1')
        self.assertSequenceEqual(self.handler.headers.items(), ())

    def test_http_1_0(self):
        result = self.send_typical_request(b'GET / HTTP/1.0\r\n\r\n')
        self.verify_http_server_response(result[0])
        self.verify_expected_headers(result[1:-1])
        self.verify_get_called()
        self.assertEqual(result[-1], b'<html><body>Data</body></html>\r\n')
        self.assertEqual(self.handler.requestline, 'GET / HTTP/1.0')
        self.assertEqual(self.handler.command, 'GET')
        self.assertEqual(self.handler.path, '/')
        self.assertEqual(self.handler.request_version, 'HTTP/1.0')
        self.assertSequenceEqual(self.handler.headers.items(), ())

    def test_http_0_9(self):
        result = self.send_typical_request(b'GET / HTTP/0.9\r\n\r\n')
        self.assertEqual(len(result), 1)
        self.assertEqual(result[0], b'<html><body>Data</body></html>\r\n')
        self.verify_get_called()

    def test_extra_space(self):
        result = self.send_typical_request(
            b'GET /spaced out HTTP/1.1\r\n'
            b'Host: dummy\r\n'
            b'\r\n'
        )
        self.assertTrue(result[0].startswith(b'HTTP/1.1 400 '))
        self.verify_expected_headers(result[1:result.index(b'\r\n')])
        self.assertFalse(self.handler.get_called)

    def test_with_continue_1_0(self):
        result = self.send_typical_request(b'GET / HTTP/1.0\r\nExpect: 100-continue\r\n\r\n')
        self.verify_http_server_response(result[0])
        self.verify_expected_headers(result[1:-1])
        self.verify_get_called()
        self.assertEqual(result[-1], b'<html><body>Data</body></html>\r\n')
        self.assertEqual(self.handler.requestline, 'GET / HTTP/1.0')
        self.assertEqual(self.handler.command, 'GET')
        self.assertEqual(self.handler.path, '/')
        self.assertEqual(self.handler.request_version, 'HTTP/1.0')
        headers = (("Expect", "100-continue"),)
        self.assertSequenceEqual(self.handler.headers.items(), headers)

    def test_with_continue_1_1(self):
        result = self.send_typical_request(b'GET / HTTP/1.1\r\nExpect: 100-continue\r\n\r\n')
        self.assertEqual(result[0], b'HTTP/1.1 100 Continue\r\n')
        self.assertEqual(result[1], b'\r\n')
        self.assertEqual(result[2], b'HTTP/1.1 200 OK\r\n')
        self.verify_expected_headers(result[2:-1])
        self.verify_get_called()
        self.assertEqual(result[-1], b'<html><body>Data</body></html>\r\n')
        self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1')
        self.assertEqual(self.handler.command, 'GET')
        self.assertEqual(self.handler.path, '/')
        self.assertEqual(self.handler.request_version, 'HTTP/1.1')
        headers = (("Expect", "100-continue"),)
        self.assertSequenceEqual(self.handler.headers.items(), headers)

    def test_header_buffering_of_send_error(self):

        input = BytesIO(b'GET / HTTP/1.1\r\n\r\n')
        output = AuditableBytesIO()
        handler = SocketlessRequestHandler()
        handler.rfile = input
        handler.wfile = output
        handler.request_version = 'HTTP/1.1'
        handler.requestline = ''
        handler.command = None

        handler.send_error(418)
        self.assertEqual(output.numWrites, 2)

    def test_header_buffering_of_send_response_only(self):

        input = BytesIO(b'GET / HTTP/1.1\r\n\r\n')
        output = AuditableBytesIO()
        handler = SocketlessRequestHandler()
        handler.rfile = input
        handler.wfile = output
        handler.request_version = 'HTTP/1.1'

        handler.send_response_only(418)
        self.assertEqual(output.numWrites, 0)
        handler.end_headers()
        self.assertEqual(output.numWrites, 1)

    def test_header_buffering_of_send_header(self):

        input = BytesIO(b'GET / HTTP/1.1\r\n\r\n')
        output = AuditableBytesIO()
        handler = SocketlessRequestHandler()
        handler.rfile = input
        handler.wfile = output
        handler.request_version = 'HTTP/1.1'

        handler.send_header('Foo', 'foo')
        handler.send_header('bar', 'bar')
        self.assertEqual(output.numWrites, 0)
        handler.end_headers()
        self.assertEqual(output.getData(), b'Foo: foo\r\nbar: bar\r\n\r\n')
        self.assertEqual(output.numWrites, 1)

    def test_header_unbuffered_when_continue(self):

        def _readAndReseek(f):
            pos = f.tell()
            f.seek(0)
            data = f.read()
            f.seek(pos)
            return data

        input = BytesIO(b'GET / HTTP/1.1\r\nExpect: 100-continue\r\n\r\n')
        output = BytesIO()
        self.handler.rfile = input
        self.handler.wfile = output
        self.handler.request_version = 'HTTP/1.1'

        self.handler.handle_one_request()
        self.assertNotEqual(_readAndReseek(output), b'')
        result = _readAndReseek(output).split(b'\r\n')
        self.assertEqual(result[0], b'HTTP/1.1 100 Continue')
        self.assertEqual(result[1], b'')
        self.assertEqual(result[2], b'HTTP/1.1 200 OK')

    def test_with_continue_rejected(self):
        usual_handler = self.handler        # Save to avoid breaking any subsequent tests.
        self.handler = RejectingSocketlessRequestHandler()
        result = self.send_typical_request(b'GET / HTTP/1.1\r\nExpect: 100-continue\r\n\r\n')
        self.assertEqual(result[0], b'HTTP/1.1 417 Expectation Failed\r\n')
        self.verify_expected_headers(result[1:-1])
        # The expect handler should short circuit the usual get method by
        # returning false here, so get_called should be false
        self.assertFalse(self.handler.get_called)
        self.assertEqual(sum(r == b'Connection: close\r\n' for r in result[1:-1]), 1)
        self.handler = usual_handler        # Restore to avoid breaking any subsequent tests.

    def test_request_length(self):
        # Issue #10714: huge request lines are discarded, to avoid Denial
        # of Service attacks.
        result = self.send_typical_request(b'GET ' + b'x' * 65537)
        self.assertEqual(result[0], b'HTTP/1.1 414 Request-URI Too Long\r\n')
        self.assertFalse(self.handler.get_called)
        self.assertIsInstance(self.handler.requestline, str)

    def test_header_length(self):
        # Issue #6791: same for headers
        result = self.send_typical_request(
            b'GET / HTTP/1.1\r\nX-Foo: bar' + b'r' * 65537 + b'\r\n\r\n')
        self.assertEqual(result[0], b'HTTP/1.1 431 Line too long\r\n')
        self.assertFalse(self.handler.get_called)
        self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1')

    def test_too_many_headers(self):
        result = self.send_typical_request(
            b'GET / HTTP/1.1\r\n' + b'X-Foo: bar\r\n' * 101 + b'\r\n')
        self.assertEqual(result[0], b'HTTP/1.1 431 Too many headers\r\n')
        self.assertFalse(self.handler.get_called)
        self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1')

    def test_html_escape_on_error(self):
        result = self.send_typical_request(
            b'<script>alert("hello")</script> / HTTP/1.1')
        result = b''.join(result)
        text = '<script>alert("hello")</script>'
        self.assertIn(html.escape(text, quote=False).encode('ascii'), result)

    def test_close_connection(self):
        # handle_one_request() should be repeatedly called until
        # it sets close_connection
        def handle_one_request():
            self.handler.close_connection = next(close_values)
        self.handler.handle_one_request = handle_one_request

        close_values = iter((True,))
        self.handler.handle()
        self.assertRaises(StopIteration, next, close_values)

        close_values = iter((False, False, True))
        self.handler.handle()
        self.assertRaises(StopIteration, next, close_values)

    def test_date_time_string(self):
        now = time.time()
        # this is the old code that formats the timestamp
        year, month, day, hh, mm, ss, wd, y, z = time.gmtime(now)
        expected = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
            self.handler.weekdayname[wd],
            day,
            self.handler.monthname[month],
            year, hh, mm, ss
        )
        self.assertEqual(self.handler.date_time_string(timestamp=now), expected)


class SimpleHTTPRequestHandlerTestCase(unittest.TestCase):
    """ Test url parsing """
    def setUp(self):
        self.translated_1 = os.path.join(os.getcwd(), 'filename')
        self.translated_2 = os.path.join('foo', 'filename')
        self.translated_3 = os.path.join('bar', 'filename')
        self.handler_1 = SocketlessRequestHandler()
        self.handler_2 = SocketlessRequestHandler(directory='foo')
        self.handler_3 = SocketlessRequestHandler(directory=pathlib.PurePath('bar'))

    def test_query_arguments(self):
        path = self.handler_1.translate_path('/filename')
        self.assertEqual(path, self.translated_1)
        path = self.handler_2.translate_path('/filename')
        self.assertEqual(path, self.translated_2)
        path = self.handler_3.translate_path('/filename')
        self.assertEqual(path, self.translated_3)

        path = self.handler_1.translate_path('/filename?foo=bar')
        self.assertEqual(path, self.translated_1)
        path = self.handler_2.translate_path('/filename?foo=bar')
        self.assertEqual(path, self.translated_2)
        path = self.handler_3.translate_path('/filename?foo=bar')
        self.assertEqual(path, self.translated_3)

        path = self.handler_1.translate_path('/filename?a=b&spam=eggs#zot')
        self.assertEqual(path, self.translated_1)
        path = self.handler_2.translate_path('/filename?a=b&spam=eggs#zot')
        self.assertEqual(path, self.translated_2)
        path = self.handler_3.translate_path('/filename?a=b&spam=eggs#zot')
        self.assertEqual(path, self.translated_3)

    def test_start_with_double_slash(self):
        path = self.handler_1.translate_path('//filename')
        self.assertEqual(path, self.translated_1)
        path = self.handler_2.translate_path('//filename')
        self.assertEqual(path, self.translated_2)
        path = self.handler_3.translate_path('//filename')
        self.assertEqual(path, self.translated_3)

        path = self.handler_1.translate_path('//filename?foo=bar')
        self.assertEqual(path, self.translated_1)
        path = self.handler_2.translate_path('//filename?foo=bar')
        self.assertEqual(path, self.translated_2)
        path = self.handler_3.translate_path('//filename?foo=bar')
        self.assertEqual(path, self.translated_3)

    def test_windows_colon(self):
        with support.swap_attr(server.os, 'path', ntpath):
            path = self.handler_1.translate_path('c:c:c:foo/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_1)
            path = self.handler_2.translate_path('c:c:c:foo/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_2)
            path = self.handler_3.translate_path('c:c:c:foo/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_3)

            path = self.handler_1.translate_path('\\c:../filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_1)
            path = self.handler_2.translate_path('\\c:../filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_2)
            path = self.handler_3.translate_path('\\c:../filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_3)

            path = self.handler_1.translate_path('c:\\c:..\\foo/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_1)
            path = self.handler_2.translate_path('c:\\c:..\\foo/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_2)
            path = self.handler_3.translate_path('c:\\c:..\\foo/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_3)

            path = self.handler_1.translate_path('c:c:foo\\c:c:bar/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_1)
            path = self.handler_2.translate_path('c:c:foo\\c:c:bar/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_2)
            path = self.handler_3.translate_path('c:c:foo\\c:c:bar/filename')
            path = path.replace(ntpath.sep, os.sep)
            self.assertEqual(path, self.translated_3)


class MiscTestCase(unittest.TestCase):
    def test_all(self):
        expected = []
        denylist = {'executable', 'nobody_uid', 'test'}
        for name in dir(server):
            if name.startswith('_') or name in denylist:
                continue
            module_object = getattr(server, name)
            if getattr(module_object, '__module__', None) == 'http.server':
                expected.append(name)
        self.assertCountEqual(server.__all__, expected)


class ScriptTestCase(unittest.TestCase):

    def mock_server_class(self):
        return mock.MagicMock(
            return_value=mock.MagicMock(
                __enter__=mock.MagicMock(
                    return_value=mock.MagicMock(
                        socket=mock.MagicMock(
                            getsockname=lambda: ('', 0),
                        ),
                    ),
                ),
            ),
        )

    @mock.patch('builtins.print')
    def test_server_test_unspec(self, _):
        mock_server = self.mock_server_class()
        server.test(ServerClass=mock_server, bind=None)
        self.assertIn(
            mock_server.address_family,
            (socket.AF_INET6, socket.AF_INET),
        )

    @mock.patch('builtins.print')
    def test_server_test_localhost(self, _):
        mock_server = self.mock_server_class()
        server.test(ServerClass=mock_server, bind="localhost")
        self.assertIn(
            mock_server.address_family,
            (socket.AF_INET6, socket.AF_INET),
        )

    ipv6_addrs = (
        "::",
        "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
        "::1",
    )

    ipv4_addrs = (
        "0.0.0.0",
        "8.8.8.8",
        "127.0.0.1",
    )

    @mock.patch('builtins.print')
    def test_server_test_ipv6(self, _):
        for bind in self.ipv6_addrs:
            mock_server = self.mock_server_class()
            server.test(ServerClass=mock_server, bind=bind)
            self.assertEqual(mock_server.address_family, socket.AF_INET6)

    @mock.patch('builtins.print')
    def test_server_test_ipv4(self, _):
        for bind in self.ipv4_addrs:
            mock_server = self.mock_server_class()
            server.test(ServerClass=mock_server, bind=bind)
            self.assertEqual(mock_server.address_family, socket.AF_INET)


def setUpModule():
    unittest.addModuleCleanup(os.chdir, os.getcwd())


if __name__ == '__main__':
    unittest.main()

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
21 Aug 2026 4.01 AM
root / linksafe
0755
__pycache__
--
21 Aug 2026 4.01 AM
root / linksafe
0755
audiodata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
certdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
cjkencodings
--
21 Aug 2026 4.01 AM
root / linksafe
0755
configdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
crashers
--
21 Aug 2026 4.01 AM
root / linksafe
0755
data
--
21 Aug 2026 4.01 AM
root / linksafe
0755
decimaltestdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
dtracedata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
encoded_modules
--
21 Aug 2026 4.01 AM
root / linksafe
0755
imghdrdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
leakers
--
21 Aug 2026 4.01 AM
root / linksafe
0755
libregrtest
--
21 Aug 2026 4.01 AM
root / linksafe
0755
regrtestdata
--
17 Aug 2026 3.13 PM
root / linksafe
0755
sndhdrdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
subprocessdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
support
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_ast
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_asyncio
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_capi
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_cext
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_concurrent_futures
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_cppext
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_ctypes
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_dataclasses
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_doctest
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_email
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_future_stmt
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_gdb
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_import
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_importlib
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_inspect
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_json
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_lib2to3
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_module
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_multiprocessing_fork
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_multiprocessing_forkserver
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_multiprocessing_spawn
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_peg_generator
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_pydoc
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_sqlite3
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_tkinter
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_tomllib
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_tools
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_ttk
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_unittest
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_warnings
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_zipfile
--
21 Aug 2026 4.01 AM
root / linksafe
0755
test_zoneinfo
--
21 Aug 2026 4.01 AM
root / linksafe
0755
tokenizedata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
tracedmodules
--
21 Aug 2026 4.01 AM
root / linksafe
0755
translationdata
--
17 Aug 2026 3.13 PM
root / linksafe
0755
typinganndata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
wheeldata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
xmltestdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
ziptestdata
--
21 Aug 2026 4.01 AM
root / linksafe
0755
Sine-1000Hz-300ms.aif
60.25 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
__init__.py
0.046 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
__main__.py
0.065 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
_test_atexit.py
3.614 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
_test_eintr.py
17.72 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
_test_embed_set_config.py
8.64 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
_test_embed_structseq.py
1.988 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
_test_multiprocessing.py
216.264 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
_test_venv_multiprocessing.py
0.777 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
archiver_tests.py
6.104 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
audiotest.au
27.484 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
audiotests.py
12.134 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
audit-tests.py
13.758 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
autotest.py
0.209 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
bisect_cmd.py
5.355 KB
17 Aug 2026 3.08 PM
root / linksafe
0755
clinic.test.c
139.104 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
cmath_testcases.txt
141.197 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
curses_tests.py
1.227 KB
17 Aug 2026 3.08 PM
root / linksafe
0755
datetimetester.py
265.734 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
dis_module.py
0.074 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
empty.vbs
0.068 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
exception_hierarchy.txt
2.331 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
floating_points.txt
15.92 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
fork_wait.py
2.294 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
formatfloat_testcases.txt
7.451 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
ieee754.txt
3.15 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
levenshtein_examples.json
406.437 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
list_tests.py
16.899 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
lock_tests.py
35.642 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
mailcap.txt
1.24 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
mapping_tests.py
21.869 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
math_testcases.txt
23.186 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
memory_watchdog.py
0.694 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
mime.types
47.372 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
mock_socket.py
3.687 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
mp_fork_bomb.py
0.438 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
mp_preload.py
0.343 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
multibytecodec_support.py
14.187 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
pickletester.py
172.369 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
profilee.py
2.97 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
pstats.pck
65.046 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
pyclbr_input.py
1.63 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
pythoninfo.py
28.477 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
randv2_32.pck
7.341 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
randv2_64.pck
7.192 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
randv3.pck
7.816 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
re_tests.py
25.943 KB
17 Aug 2026 3.08 PM
root / linksafe
0755
recursion.tar
0.504 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
regrtest.py
1.282 KB
17 Aug 2026 3.08 PM
root / linksafe
0755
relimport.py
0.026 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
reperf.py
0.525 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
seq_tests.py
14.958 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
signalinterproctester.py
3.122 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
ssl_servers.py
7.12 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
ssltests.py
1.026 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
string_tests.py
71.244 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test___all__.py
5.042 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test__locale.py
12.521 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test__opcode.py
4.141 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test__osx_support.py
13.534 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test__xxinterpchannels.py
52.186 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test__xxsubinterpreters.py
27.497 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_abc.py
23.814 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_abstract_numbers.py
5.813 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_aifc.py
17.838 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_argparse.py
218.49 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_array.py
55.438 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_asdl_parser.py
4.442 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_asyncgen.py
53.944 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_atexit.py
3.2 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_audioop.py
28.317 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_audit.py
9.217 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_augassign.py
7.684 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_base64.py
35.055 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_baseexception.py
7.773 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bdb.py
44.168 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bigaddrspace.py
2.83 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bigmem.py
45.008 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_binascii.py
20.095 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_binop.py
14.14 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bisect.py
16.625 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bool.py
14.247 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_buffer.py
171.878 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bufio.py
2.558 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_builtin.py
96.658 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bytes.py
82.015 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_bz2.py
43.288 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_c_locale_coercion.py
20.992 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_calendar.py
51.782 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_call.py
35.212 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cgi.py
22.271 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cgitb.py
2.62 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_charmapcodec.py
1.771 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_class.py
22.016 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_clinic.py
85.406 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cmath.py
22.47 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cmd.py
6.491 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cmd_line.py
39.512 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cmd_line_script.py
34.928 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_code.py
25.695 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_code_module.py
12.728 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codeccallbacks.py
49.229 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecencodings_cn.py
3.857 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecencodings_hk.py
0.685 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecencodings_iso2022.py
3.654 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecencodings_jp.py
4.792 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecencodings_kr.py
2.957 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecencodings_tw.py
0.665 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecmaps_cn.py
0.729 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecmaps_hk.py
0.377 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecmaps_jp.py
1.703 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecmaps_kr.py
1.16 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecmaps_tw.py
0.688 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codecs.py
137.42 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_codeop.py
8.676 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_collections.py
93.466 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_colorsys.py
4.268 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_compare.py
17.459 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_compile.py
81.241 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_compileall.py
48.528 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_compiler_assemble.py
2.458 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_compiler_codegen.py
1.725 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_complex.py
35.211 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_configparser.py
86.702 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_contains.py
3.352 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_context.py
31.099 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_contextlib.py
43.077 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_contextlib_async.py
23.988 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_copy.py
26.522 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_copyreg.py
4.363 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_coroutines.py
67.469 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_cprofile.py
9.442 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_crashers.py
1.169 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_crypt.py
4.191 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_csv.py
63.761 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_curses.py
50.14 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_datetime.py
2.671 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dbm.py
6.828 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dbm_dumb.py
11.076 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dbm_gnu.py
7.643 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dbm_ndbm.py
5.907 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_decimal.py
217.939 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_decorators.py
14.626 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_defaultdict.py
6.102 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_deque.py
33.163 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_descr.py
196.202 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_descrtut.py
10.982 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_devpoll.py
4.442 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dict.py
51.329 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dict_version.py
6.096 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dictcomps.py
6.548 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dictviews.py
14.821 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_difflib.py
21.475 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_difflib_expect.html
100.904 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
test_dis.py
83.447 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_docxmlrpc.py
9.099 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dtrace.py
7.979 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dynamic.py
5.995 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_dynamicclassattribute.py
9.565 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_eintr.py
0.612 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_embed.py
69.878 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ensurepip.py
11.494 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_enum.py
188.151 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_enumerate.py
9.137 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_eof.py
7.94 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_epoll.py
9.404 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_errno.py
1.044 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_except_star.py
39.702 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_exception_group.py
34.026 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_exception_hierarchy.py
7.54 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_exception_variations.py
13.738 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_exceptions.py
83.625 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_extcall.py
14.689 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_faulthandler.py
30.311 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fcntl.py
7.762 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_file.py
11.782 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_file_eintr.py
10.735 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_filecmp.py
11.979 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fileinput.py
37.858 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fileio.py
19.976 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fileutils.py
0.929 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_finalization.py
14.657 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_float.py
64.649 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_flufl.py
2.807 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fnmatch.py
10.683 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fork1.py
3.305 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_format.py
28.442 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fractions.py
65.65 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_frame.py
14.044 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_frozen.py
2.198 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_fstring.py
64.739 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ftplib.py
43.549 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_funcattrs.py
15.711 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_functools.py
114.021 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_gc.py
47.711 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_generator_stop.py
0.921 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_generators.py
66.484 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_genericalias.py
17.775 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_genericclass.py
9.439 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_genericpath.py
23.254 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_genexps.py
7.305 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_getopt.py
6.938 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_getpass.py
6.37 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_getpath.py
44.361 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_gettext.py
41.958 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_glob.py
18.21 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_global.py
1.196 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_grammar.py
66.311 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_graphlib.py
8.313 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_grp.py
3.67 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_gzip.py
41.479 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_hash.py
12.113 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_hashlib.py
46.708 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_heapq.py
16.422 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_hmac.py
26.063 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_html.py
4.234 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_htmlparser.py
46.474 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_http_cookiejar.py
81.548 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_http_cookies.py
25.245 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_httplib.py
102.987 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_httpservers.py
57.947 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_idle.py
0.812 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_imaplib.py
42.111 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_imghdr.py
4.813 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_index.py
8.371 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_int.py
33.975 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_int_literal.py
6.888 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_interpreters.py
32.11 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_io.py
183.891 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ioctl.py
3.24 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ipaddress.py
126.692 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_isinstance.py
12.949 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_iter.py
38.229 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_iterlen.py
7.096 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_itertools.py
113.531 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_keyword.py
2.002 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_keywordonlyarg.py
6.893 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_kqueue.py
9.364 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_largefile.py
11.054 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_launcher.py
28.752 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_linecache.py
12.56 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_list.py
9.599 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_listcomps.py
24.017 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_lltrace.py
3.706 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_locale.py
24.691 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_logging.py
251.698 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_long.py
63.403 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_longexp.py
0.228 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_lzma.py
93.004 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_mailbox.py
93.909 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_mailcap.py
11.476 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_marshal.py
23.148 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_math.py
108.303 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_math_property.py
1.153 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_memoryio.py
32.651 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_memoryview.py
22.229 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_metaclass.py
6.193 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_mimetypes.py
15.741 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_minidom.py
69.564 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_mmap.py
38.563 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_modulefinder.py
12.21 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_monitoring.py
55.757 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_msilib.py
5.516 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_multibytecodec.py
15.793 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_multiprocessing_main_handling.py
11.482 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_named_expressions.py
29.622 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_netrc.py
11.857 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_nis.py
1.255 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_nntplib.py
62.697 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ntpath.py
64.113 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_numeric_tower.py
7.996 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_opcache.py
10.893 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_opcodes.py
3.62 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_openpty.py
0.586 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_operator.py
26.716 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_optparse.py
61.393 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ordered_dict.py
39.957 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_os.py
181.055 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ossaudiodev.py
7.271 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_osx_env.py
1.307 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pathlib.py
138.013 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_patma.py
86.602 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pdb.py
92.917 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_peepholer.py
40.604 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pep646_syntax.py
7.795 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_perf_profiler.py
11.411 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_perfmaps.py
0.669 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pickle.py
21.243 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_picklebuffer.py
4.989 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pickletools.py
16.78 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pipes.py
6.787 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pkg.py
9.594 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pkgutil.py
26.221 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_platform.py
21.531 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_plistlib.py
42.615 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_poll.py
7.394 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_popen.py
2.363 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_poplib.py
18.016 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_positional_only_arg.py
18.444 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_posix.py
96.253 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_posixpath.py
44.923 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pow.py
6.385 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pprint.py
50.586 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_print.py
8.053 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_profile.py
8.692 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_property.py
19.325 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pstats.py
4.312 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pty.py
16.18 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pulldom.py
12.332 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pwd.py
4.324 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_py_compile.py
11.933 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pyclbr.py
10.246 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_pyexpat.py
42.823 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_queue.py
20.614 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_quopri.py
7.868 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_raise.py
13.442 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_random.py
57.006 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_range.py
26.53 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_re.py
144.786 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_readline.py
15.721 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_regrtest.py
92.506 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_repl.py
6.344 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_reprlib.py
29.071 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_resource.py
7.115 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_richcmp.py
11.945 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_rlcompleter.py
7.398 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_robotparser.py
11.017 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_runpy.py
33.989 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sax.py
54.633 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sched.py
7.378 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_scope.py
21.941 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_script_helper.py
5.82 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_secrets.py
4.278 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_select.py
3.422 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_selectors.py
19.638 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_set.py
71.309 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_setcomps.py
5.244 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_shelve.py
6.419 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_shlex.py
13.392 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_shutil.py
140.348 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_signal.py
52.581 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_site.py
29.771 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_slice.py
9.46 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_smtplib.py
60.02 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_smtpnet.py
3.027 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sndhdr.py
1.506 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_socket.py
261.133 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_socketserver.py
17.395 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sort.py
13.591 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_source_encoding.py
12.653 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_spwd.py
2.835 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ssl.py
216.517 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_stable_abi_ctypes.py
24.748 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_startfile.py
1.695 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_stat.py
8.922 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_statistics.py
120.024 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_strftime.py
7.404 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_string.py
21.858 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_string_literals.py
14.101 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_stringprep.py
3.04 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_strptime.py
41.948 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_strtod.py
20.056 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_struct.py
39.18 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_structseq.py
7.722 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_subclassinit.py
8.043 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_subprocess.py
161.374 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sunau.py
6.093 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sundry.py
1.022 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_super.py
14.787 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_support.py
27.052 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_symtable.py
17.559 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_syntax.py
73.954 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sys.py
67.373 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sys_setprofile.py
14.534 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sys_settrace.py
84.558 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_sysconfig.py
26.078 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_syslog.py
4.704 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tabnanny.py
13.899 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tarfile.py
190.533 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tcl.py
30.301 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_telnetlib.py
12.848 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tempfile.py
75.505 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_termios.py
10.96 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_textwrap.py
41.886 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_thread.py
8.866 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_threadedtempfile.py
1.929 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_threading.py
74.212 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_threading_local.py
7.011 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_threadsignals.py
9.871 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_time.py
44.651 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_timeit.py
15.195 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_timeout.py
10.74 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tix.py
1.049 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tokenize.py
118.005 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_trace.py
21.521 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_traceback.py
144.404 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tracemalloc.py
40.971 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ttk_textonly.py
16.693 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tty.py
3.63 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_tuple.py
19.801 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_turtle.py
14.038 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_type_aliases.py
12.743 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_type_annotations.py
6.233 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_type_cache.py
6.596 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_type_comments.py
10.501 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_type_params.py
38.866 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_typechecks.py
2.554 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_types.py
82.379 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_typing.py
343.332 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_ucn.py
9.712 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unary.py
1.524 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unicode.py
125.435 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unicode_file.py
5.719 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unicode_file_functions.py
6.908 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unicode_identifiers.py
0.974 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unicodedata.py
18.564 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_univnewlines.py
3.854 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unpack.py
3.507 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unpack_ex.py
9.977 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_unparse.py
27.962 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urllib.py
73.042 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urllib2.py
80.817 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urllib2_localnet.py
25.64 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urllib2net.py
13.958 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urllib_response.py
2.04 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urllibnet.py
9.407 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_urlparse.py
81.411 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_userdict.py
7.563 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_userlist.py
1.969 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_userstring.py
2.519 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_utf8_mode.py
10.312 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_utf8source.py
1.081 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_uu.py
9.195 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_uuid.py
44.279 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_venv.py
37.424 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_wait3.py
1.739 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_wait4.py
1.14 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_wave.py
7.641 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_weakref.py
74.318 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_weakset.py
16.304 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_webbrowser.py
13.363 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_winapi.py
2.627 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_winconsoleio.py
7.6 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_winreg.py
22.479 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_winsound.py
5.172 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_with.py
27.778 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_wmi.py
3.311 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_wsgiref.py
31.005 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xdrlib.py
2.253 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xml_dom_minicompat.py
4.182 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xml_dom_xmlbuilder.py
3.098 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xml_etree.py
170.074 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xml_etree_c.py
9.337 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xmlrpc.py
58.079 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xmlrpc_net.py
0.932 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xxlimited.py
2.462 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_xxtestfuzz.py
0.674 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_yield_from.py
50.227 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_zipapp.py
16.702 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_zipfile64.py
5.784 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_zipimport.py
31.879 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_zipimport_support.py
10.567 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
test_zlib.py
41.657 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
testcodec.py
1.021 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
testtar.tar
425 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
testtar.tar.xz
0.168 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
tf_inherit_check.py
0.697 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
time_hashlib.py
2.874 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
win_console_handler.py
1.383 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
xmltests.py
0.487 KB
17 Aug 2026 3.08 PM
root / linksafe
0644
zip_cp437_header.zip
0.264 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
zipdir.zip
0.365 KB
12 Aug 2026 1.57 PM
root / linksafe
0644
zipdir_backslash.zip
0.188 KB
12 Aug 2026 1.57 PM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF