0x1949 Team - FAZEMRX - MANAGER
Edit File: save_env.cpython-310.pyc
o ��+g�2 � @ sn d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dl m Z G dd� de�ZG dd� d�Z dS ) � N)�support)� os_helper)� print_warningc @ s e Zd ZdS )�SkipTestEnvironmentN)�__name__� __module__�__qualname__� r r �0/usr/lib/python3.10/test/libregrtest/save_env.pyr s r c @ s e Zd ZdZd�dd�dd�ZdZdd � Zd d� Zdd � Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd8d9� Zd:d;� Zd<d=� Z d>d?� Z!d@dA� Z"dBdC� Z#dDdE� Z$dFdG� Z%dHdI� Z&dJdK� Z'dLdM� Z(dNdO� Z)dPdQ� Z*dRdS� Z+dTdU� Z,dVdW� Z-dXdY� Z.dZd[� Z/d\d]� Z0d^d_� Z1d`da� Z2dbdc� Z3ddde� Z4dfdg� Z5dhdi� Z6djdk� Z7dldm� Z8dndo� Z9dpdq� e:e;�D �Z<drds� Z=dtdu� Z>dvdw� Z?dxdy� Z@dzd{� ZAd|d}� ZBd~d� ZCd�S )��saved_test_environmenta� Save bits of the test environment and restore them at block exit. with saved_test_environment(testname, verbose, quiet): #stuff Unless quiet is True, a warning is printed to stderr if any of the saved items was changed by the test. The support.environment_altered attribute is set to True if a change is detected. If verbose is more than 1, the before and after state of changed items is also printed. r F)�pgoc C s || _ || _|| _|| _d S �N)�testname�verbose�quietr )�selfr r r r r r r �__init__% s zsaved_test_environment.__init__)zsys.argv�cwdz sys.stdinz sys.stdoutz sys.stderrz os.environzsys.pathzsys.path_hooks� __import__zwarnings.filterszasyncore.socket_mapzlogging._handlerszlogging._handlerListzsys.gettracezsys.warnoptionsz!multiprocessing.process._danglingzthreading._danglingzsysconfig._CONFIG_VARSzsysconfig._INSTALL_SCHEMES�files�localezwarnings.showwarning�shutil_archive_formats�shutil_unpack_formatsz!asyncio.events._event_loop_policyzurllib.requests._url_tempfileszurllib.requests._openerc C s t j| S r )�sys�modules�r �namer r r � get_moduleD � z!saved_test_environment.get_modulec C s z| � |�W S ty t�w r )r �KeyErrorr r r r r �try_get_moduleH s �z%saved_test_environment.try_get_modulec C s | � d�}t|j�S �Nzurllib.request)r �list�_url_tempfiles�r �urllib_requestr r r �"get_urllib_requests__url_tempfilesO � z9saved_test_environment.get_urllib_requests__url_tempfilesc C s |D ]}t �|� qd S r )r �unlink)r � tempfiles�filenamer r r �&restore_urllib_requests__url_tempfilesR s �z=saved_test_environment.restore_urllib_requests__url_tempfilesc C � | � d�}|jS r! )r �_openerr$ r r r �get_urllib_requests__openerV � z2saved_test_environment.get_urllib_requests__openerc C � | � d�}||_d S r! )r r- )r �openerr% r r r �restore_urllib_requests__openerY r'