Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_memoryview.cpython-311.pyc |
�
�Ke~U � �N � d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlmZ G d� d� � Z G d� de� � Z
G d� d e� � Z G d
� d� � Z G d� d
� � Z G d� d� � Z G d� dej ee
� � Z G d� dej ee� � Z G d� dej ee
� � Z G d� dej ee� � Z G d� dej ee
� � Z G d� dej ee� � Z G d� dej � � Zedk r ej � � dS dS )z�Unit tests for the memoryview
Some tests are in test_bytes. Many tests that require _testbuffer.ndarray
are in test_buffer.
� N)�
import_helperc �� � e Zd ZdZed� � � Zed� � � Zd� Zd� Zd� Z d� Z
d� Zd � Zd
� Z
d� Zd� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�AbstractMemoryTests� abcdefc � � | j S �N)�source_bytes��selfs �>/usr/local/apps/python3/lib/python3.11/test/test_memoryview.py�_sourcezAbstractMemoryTests._source s � �� � � c �: � t d | j | j g� � S r )�filter�ro_type�rw_typer
s r �_typeszAbstractMemoryTests._types s � ��d�T�\�4�<�8�9�9�9r c � �� || j � � }t j |� � }| � |� � �| � �d t d� � � � | � �d t � � | � �d t d� � � � | � �d t d� � � � | � �d t d� � � � | � t �fd�� � | � t �fd�� � | � t �fd �� � | � t �fd
�� � | � t �fd�� � | � t �fd�� � | � t �fd
�� � d �| � t j |� � |� � d S )Nr � a� � f���i����c � �� � d S )N� � ��ms �r �<lambda>z=AbstractMemoryTests.check_getitem_with_type.<locals>.<lambda>) s �� �a��d� r c � �� � d S )N���r r s �r r z=AbstractMemoryTests.check_getitem_with_type.<locals>.<lambda>* s �� �a��e� r c �( �� � t j S r ��sys�maxsizer s �r r z=AbstractMemoryTests.check_getitem_with_type.<locals>.<lambda>+ s
�� �a���n� r c �* �� � t j S r r"