관리-도구
편집 파일: test_number.cpython-311.pyc
� O�DgF! � �� � d Z ddlZddlZddlT ddlmZ ddlmZ ddlm Z G d� de � � Z G d � d ej � � Z G d� dej � � Zi fd �Zedk rd� Z ej d�� � dS dS )z+Self-tests for (some of) Crypto.Util.number� N)�*)�list_test_cases)�number)� long_to_bytesc � � e Zd ZdZdS )�MyErrorzDummy exception used for testsN)�__name__� __module__�__qualname__�__doc__� � ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/Util/test_number.pyr r % s � � � � � �(�(�(�(r r c �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )� MiscTestsc �� � | � t t j dd� � | � t t j dd� � | � t t j dd� � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j d d� � � � | � dt j d d� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j dd� � � � | � dt j d d� � � � | � dt j d d� � � � | � dt j dd� � � � | � dt j dd� � � � d S )zUtil.number.ceil_div�1� r ���� � � � � � � � N)�assertRaises� TypeErrorr �ceil_div�ZeroDivisionError�assertEqual��selfs r � test_ceil_divzMiscTests.test_ceil_div- s � ����)�V�_�c�1�=�=�=����+�V�_�a��C�C�C����+�V�_�b�!�D�D�D� ����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2� ����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2� ����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2� ����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�����F�O�A�q�1�1�2�2�2�2�2r c � � | � t t j d� � | � t t j d� � | � t t j d� � d}t d� � D ]S}t j |� � }| � |d|dz z k d� � | � |d|z k d� � �Td}t j |� � }| � |dz d� � | � |d|dz z k d� � | � |d|z k d� � dS ) zUtil.number.getPrimei����r r r �d � r N)r � ValueErrorr �getPrime�ranger"