관리-도구
편집 파일: test_protocols.cpython-311.pyc
� �܋f� � �j � d dl Z d dlZd dlZe j � d� � d� � � Zd� ZdS )� N�errorc �� � G d� d� � } | t j d� � � � }t j t d�� � 5 t j |� � d d d � � d S # 1 swxY w Y d S )Nc �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )�%test_getattr_warning.<locals>.Wrapperc � � || _ d S �N)�array)�selfr s �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/core/tests/test_protocols.py�__init__z.test_getattr_warning.<locals>.Wrapper.__init__ s � ��D�J�J�J� c �* � t | j � � S r )�lenr �r s r �__len__z-test_getattr_warning.<locals>.Wrapper.__len__ s � ��t�z�?�?�"r c �H � t | � � | j | � � S r )�typer )r �items r �__getitem__z1test_getattr_warning.<locals>.Wrapper.__getitem__ s � ��4��:�:�d�j��.�/�/�/r c � � |� d� � rt j dt d�� � t | j |� � S )N�__array_�object got converted� )� stacklevel)� startswith�warnings�warn�UserWarning�getattrr )r �names r �__getattr__z1test_getattr_warning.<locals>.Wrapper.__getattr__ sA � ����z�*�*� Q�� �4�k�a�P�P�P�P��4�:�t�,�,�,r c �. � d� | �� � S )Nz<Wrapper({self.array})>r )�formatr s r �__repr__z.test_getattr_warning.<locals>.Wrapper.__repr__ s � �,�3�3��3�>�>�>r N)�__name__� __module__�__qualname__r r r r! r$ � r r �Wrapperr s_ � � � � � � � � � #� #� #� 0� 0� 0� -� -� -� ?� ?� ?� ?� ?r r) � r )�match)�np�arange�pytest�raisesr �asarray)r) r s r �test_getattr_warningr1 s� � �?� ?� ?� ?� ?� ?� ?� ?�&