관리-도구
편집 파일: test_extension_interface.cpython-38.pyc
U �g� � @ sl d dl mZ d dl mZ d dlZd dlZddlmZ ddlmZ G dd� de�Ze d krhd dl Z e �� dS ) � )�print_function)�absolute_importN� )�_test_extension)�TestCasec @ sd e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dS )� CAPITestsc C s | � dt�t�dd� ��� d S )N�2 c S s dS )Nr � r r r �W/opt/hc_python/lib64/python3.8/site-packages/greenlet/tests/test_extension_interface.py�<lambda> � z'CAPITests.test_switch.<locals>.<lambda>)�assertEqualr �test_switch�greenlet��selfr r r r s �zCAPITests.test_switchc C s. dd� }t � |�}| �dtj|ddd�� d S )Nc S s | | S �Nr ��x�yr r r �adder s z+CAPITests.test_switch_kwargs.<locals>.adder� � � r )r r r �test_switch_kwargs)r r �gr r r r s zCAPITests.test_switch_kwargsc C s, dd� }t � |��� }| �d t�|�� d S )Nc S sB dd� } t � | �}|�� t �� j�|� t �� j�td�� d S )Nc S s( t �� j�� t �� j�� td��d S )Nz#Should never have reached this code)r � getcurrent�parent�switch�AssertionErrorr r r r �bar s z2CAPITests.test_setparent.<locals>.foo.<locals>.barzShould never reach this code)r r r r �throwr )r �childr r r �foo s �z%CAPITests.test_setparent.<locals>.foo)r r r r �test_setparent)r r# Z foo_childr r r r$ s zCAPITests.test_setparentc C s t �� d S r )r �test_getcurrentr r r r r% * s zCAPITests.test_getcurrentc C s | � dt�dd� �� d S )N��c S s dS )Nr&