관리-도구
편집 파일: test_version.cpython-38.pyc
U �g; � @ sP d dl mZ d dl mZ d dlZd dlZd dlmZ d dlZG dd� de�Z dS )� )�absolute_import)�print_functionN)�TestCasec @ s e Zd Zdd� ZdS )�VersionTestsc C s� dd� }z|d�}W n4 t k rH } z| �dt|� � W 5 d }~X Y nX dtj|f }t�|��}|�� �� }W 5 Q R X | � |t j� d S )Nc S s� t j�| �r| S g }t j�t j�t��}td�D ]T}dg| }|g| | g }t jj|� }t j�|�}|�|� t j�|�r0| S q0t d| d t |� ��d S )N� z..zCould not find file z ; checked )�os�path�exists�abspath�dirname�__file__�range�join�append�AssertionError�str)�nameZtried�here�i�upr �fname� r �K/opt/hc_python/lib64/python3.8/site-packages/greenlet/tests/test_version.py�find_dominating_file s z7VersionTests.test_version.<locals>.find_dominating_filezsetup.pyz.Unable to find setup.py; must be out of tree. z%s %s --version)r ZskipTestr �sys� executabler �popen�read�stripZassertEqual�greenlet�__version__)�selfr �setup_py�eZinvoke_setup�fZsversionr r r �test_version s $zVersionTests.test_versionN)�__name__� __module__�__qualname__r% r r r r r s r ) � __future__r r r r Zunittestr ZNonLeakingTestCaser r r r r r �<module> s