관리-도구
편집 파일: test_symbol.cpython-311.pyc
� �܋f� � �x � d Z ddlZddlmZ ddlmZ ddlmZm Z m Z G d� d� � Z G d� d� � Zej � d ej g d �d�� � eg d �� � f� � G d � d� � � � Z G d� d� � Z G d� d� � Z G d� d� � Zd� Zd� Zd� Zd� Zd� ZdS )zE Tests related to the ``symbol`` attribute of the ABCPolyBase class. � N)�array)�assert_equal� assert_raises�assert_c �� � e Zd ZdZg d�Zd� Zej � dde fde fde fde ff� � d � � � Zej � d d� � d� � � Zd � Z d� ZdS )�TestInitz5 Test polynomial creation with symbol kwarg. �� � � c �b � t j | j � � }t |j d� � d S )N�x��poly� Polynomial�cr �symbol��self�ps �u/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/polynomial/tests/test_symbol.py�test_default_symbolzTestInit.test_default_symbol s+ � ��O�D�F�#�#���Q�X�s�#�#�#�#�#� )� bad_input� exception� �3Nr c � � t j |� � 5 t j | j |�� � }d d d � � d S # 1 swxY w Y d S )N�r )�pytest�raisesr r r )r r r r s r �test_symbol_bad_inputzTestInit.test_symbol_bad_input s� � � �]�9� %� %� :� :�����y�9�9�9�A� :� :� :� :� :� :� :� :� :� :� :� :���� :� :� :� :� :� :s �>�A�Ar )r �x_1�A�xyzu βc �f � t j | j |�� � }t |j |� � dS )zF Values for symbol that should pass input validation. r Nr )r r r s r �test_valid_symbolszTestInit.test_valid_symbols s2 � � �O�D�F�6�2�2�2���Q�X�v�&�&�&�&�&r c � � t j | j d�� � }t j t � � 5 d|_ ddd� � dS # 1 swxY w Y dS )z2 'symbol' attribute is read only. r r �zN)r r r r r! �AttributeErrorr r s r � test_propertyzTestInit.test_property- s� � � �O�D�F�3�/�/�/�� �]�>� *� *� � ��A�H� � � � � � � � � � � � ���� � � � � � s �A � A�Ac � � t j | j d�� � }t j |j d�� � }t |j d� � d S )N�yr �t)r r r �coefr r )r r �pts r �test_change_symbolzTestInit.test_change_symbol5 sF � ��O�D�F�3�/�/�/�� �_�Q�V�C� 0� 0� 0���R�Y��$�$�$�$�$r )�__name__� __module__�__qualname__�__doc__r r r �mark�parametrize� ValueError� TypeErrorr"