OwlCyberSecurity - MANAGER
Edit File: components.cpython-311.pyc
� ������h9�����������������������X�����d�Z�ddlZddlZddlmZ�ddlmZ�ddlmZ��G�d��d������������Z dS�)z3 Helpers for working with Zope and its components. �����N)�Set)�getSiteManager)� Componentsc��������������������|�����e�Zd�ZU�dZdZeed<����e��������������Ze d����������ed<���dZ eed<���d��Zd��Ze d����������������Zd S�) �TestComponentsz� A helper for providing a sterile registry when testing with ``zope.component``. Instantiation will install an empty registry that will be returned by :func:`zope.component.getSiteManager`. F�__test__� instances�atexit_setupc������������������������t����������d��������������_��������t����������j����������fd���������������_����������j����������������������������������������������j��������j��������s't����������j ����������j ���������������������d��j��������_��������d�S�d�S�)N�Testingc���������������������������j���������S�)N)�registry��selfs�����h/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/testfixtures/components.py�<lambda>z)TestComponents.__init__.<locals>.<lambda>���s �������d�m�������T)r���r���r����sethook�oldr ����add� __class__r ����atexit�registerr���s���`r����__init__zTestComponents.__init__���s}�������$.�y�$9�$9�� �-�5�6K�6K�6K�6K�L�L�������4� � � ��~�*�� /��O�D�K�(�(�(�*.�D�N�'�'�'� /�� /r���c������������������l�����t����������j��������|�j���������������������|�j�����������������������������|��������������dS�)z� Remove the sterile registry and replace it with the one that was in place before this :class:`TestComponents` was instantiated. N)r���r���r���r ����remover���s��� r���� uninstallzTestComponents.uninstall!���s3������� ��t�x�(�(�(�����d�#�#�#�#�#r���c������������������@�����|�j���������rt����������j��������d�������������d�S�d�S�)Nz5TestComponents instances not uninstalled by shutdown!)r ����warnings�warn)�clss��� r���r���zTestComponents.atexit*���s7�������=�� ��M�G� �� �� �� �� � �� r���N)�__name__� __module__�__qualname__�__doc__r����bool�__annotations__�setr ���r���r ���r���r����classmethodr�����r���r���r���r������s����������������������H�d����'*�s�u�u�I�s�#�$�,�,�,��L�$����/��/��/�$��$��$��������[�����r���r���) r%���r���r����typingr����zope.componentr����zope.interface.registryr���r���r*���r���r����<module>r.������s����������� � � �������������������)��)��)��)��)��)��.��.��.��.��.��.�#��#��#��#��#��#��#��#��#��#r���