Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/numpy/f2py/tests/__pycache__/test_abstract_interface.cpython-37.pyc
Назад
B �5�g � @ s6 d dl Z ddlmZ d dlmZ G dd� dej�ZdS )� N� )�util)�crackfortranc @ s2 e Zd ZdZddgZe�d�Zdd� Zdd� Z d S ) �TestAbstractInterfacez.f90Zadd1Zadd2a� module ops_module abstract interface subroutine op(x, y, z) integer, intent(in) :: x, y integer, intent(out) :: z end subroutine end interface contains subroutine foo(x, y, r1, r2) integer, intent(in) :: x, y integer, intent(out) :: r1, r2 procedure (op) add1, add2 procedure (op), pointer::p p=>add1 call p(x, y, r1) p=>add2 call p(x, y, r2) end subroutine end module subroutine add1(x, y, z) integer, intent(in) :: x, y integer, intent(out) :: z z = x + y end subroutine subroutine add2(x, y, z) integer, intent(in) :: x, y integer, intent(out) :: z z = x + 2 * y end subroutine c C s | j j�dd�dkst�d S )N� � )� � )�moduleZ ops_moduleZfoo�AssertionError)�self� r �^/home/digitalm-up/venv/lib/python3.7/site-packages/numpy/f2py/tests/test_abstract_interface.py�test_abstract_interface0 s z-TestAbstractInterface.test_abstract_interfacec C s� |d }|� d��}|�t�d�� W d Q R X t�t|�g�}t|�dksNt�t|d d �dksft�|d d d d dks�t�d S ) Nzgh18403_mod.f90�wz� module test abstract interface subroutine foo() end subroutine end interface end module test r r �body�blockzabstract interface)�open�write�textwrap�dedentr �str�lenr )r Ztmp_pathZf_path�ff�modr r r �test_parse_abstract_interface3 s z3TestAbstractInterface.test_parse_abstract_interfaceN) �__name__� __module__�__qualname__�suffix�skipr r �coder r r r r r r s #r )r � r Z numpy.f2pyr ZF2PyTestr r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.05 |
proxy
|
phpinfo
|
Настройка