
    Mh#	                     L    d dl Z d dlZd dlZdZdZ G d dej                  ZdS )    Ns  
# The event loop is not fork-safe, and it's easy to initialize an asyncio.Future
# at startup, which in turn creates the default event loop and prevents forking.
# Explicitly disallow the default event loop so that an error will be raised
# if something tries to touch it.
import asyncio
import warnings
with warnings.catch_warnings():
    warnings.simplefilter("ignore", DeprecationWarning)
    asyncio.set_event_loop(None)

import importlib
import tornado

for mod in tornado.__all__:
    if mod == "curl_httpclient":
        # This module has extra dependencies; skip it if they're not installed.
        try:
            import pycurl
        except ImportError:
            continue
    importlib.import_module(f"tornado.{mod}")
s.  
import sys
import tornado

if "tornado.web" in sys.modules:
    raise Exception("unexpected eager import")

# Trigger a lazy import by referring to something in a submodule.
tornado.web.RequestHandler

if "tornado.web" not in sys.modules:
    raise Exception("lazy import did not update sys.modules")
c                        e Zd Zd Zd Zd ZdS )
ImportTestc                     t          j        t          j        gt           j                  }|                    t                     |                     |j        d           d S N)stdinr   )	
subprocessPopensys
executablePIPEcommunicate_import_everythingassertEqual
returncodeselfprocs     X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/tornado/test/import_test.pytest_import_everythingz!ImportTest.test_import_everything.   sS    
  0
HHH+,,,!,,,,,    c                     t          j        t          j        gt           j                  }|                    t                     |                     |j        d           d S r   )	r   r	   r
   r   r   r   _import_lazyr   r   r   s     r   test_lazy_importzImportTest.test_lazy_import7   sP     0
HHH&&&!,,,,,r   c                    dd l }dd l}|                     |j        j        |j        j                   |                     |j        j        |j        j                   |                     |j        j        |j                   d S )Nr   )tornadoasyncioassertIsioloopTimeoutErrorutilgen)r   r   r   s      r   test_import_aliaseszImportTest.test_import_aliases=   sr    gn17<3LMMMgk.0IJJJgl/1EFFFFFr   N)__name__
__module____qualname__r   r   r"    r   r   r   r   -   sF        - - -- - -G G G G Gr   r   )r   r
   unittestr   r   TestCaser   r&   r   r   <module>r)      ss        



  0G G G G G" G G G G Gr   