← Back
Editing: test_ctypeslib.cpython-311.pyc
� �;7fX0 � � � d dl Z d dlZd dlZd dlmZ d dlZd dlmZm Z m Z d dlmZ d dl mZmZmZmZ d dlZdZdZ ee d� � rP e dej j j � � Zn# e$ r Y nw xY w e dej j j � � Zn# e$ r Y nw xY we� e d ej j j � � Ze� e dej j j � � Zej Zn # e$ r dZY nw xY wej � d d�� � ej � edu d �� � ej � e j dk d�� � G d� d� � � � � � � � Z! G d� d� � Z"ej � edu d�� � G d� d� � � � Z#ej � edu d�� � G d� d� � � � Z$ej � edu d�� � G d� d� � � � Z%dS )� N)�Path)� ndpointer�load_library�as_array)�get_shared_lib_extension)�assert_�assert_array_equal� assert_raises�assert_equal�gettotalrefcount�_multiarray_umath_d�_multiarray_tests�_multiarray_umathTz1Skipped as per debian/patches/python3-soabi.patch)�reasonz#ctypes not available in this python�cygwinzKnown to fail on cygwinc � � e Zd Zd� Zd� ZdS )�TestLoadLibraryc �B � t j j j }t d|� � }t t d� � |� � }t dt |� � � � }t d|� � }t |t j � � sJ �||cxu r |cxu r|u sn J �d S )Nr s _multiarray_umath) �np�corer �__file__r r � isinstance�ctypes�CDLL)�self�loader_path�out1�out2�out3�out4s �</usr/lib/python3/dist-packages/numpy/tests/test_ctypeslib.py� test_basiczTestLoadLibrary.test_basic) s� � ��g�/�8���/��=�=���D�!4�5�5�{�C�C���/��k�1B�1B�C�C���0�+�>�>���$���,�,�,�,�,��t�+�+�+�+�t�+�+�+�+�t�+�+�+�+�+�+�+�+� c �* � t d�� � }t d|z t j j j � � d S # t $ r t d� � Y d S w xY w# t $ r,}dt |� � z }t |� � Y d }~d S d }~ww xY w)NT)� is_python_extz_multiarray_umath%sz&No distutils available, skipping test.zPctypes is not available on this python: skipping the test (import error was: %s)) r r r r r r �ImportError�print�str)r �so�e�msgs r! �test_basic2zTestLoadLibrary.test_basic24 s� � � � @�-�D�A�A�A���2�R�7���9R�9[�\�\�\�\�\��� @� @� @��>�?�?�?�?�?�?� @������ � � �-�/2�1�v�v�6�C��#�J�J�J�J�J�J�J�J�J����� ���s- �7<