Sindbad~EG File Manager
�
'Μg�� � �\ � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
mZmZmZmZmZmZmZmZmZmZmZ ddlmZmZmZmZmZ ddlZddl Z ddl!m"Z"m#Z# ddl$Z$ ejL e
jN e
jP k( xs e
jR e
jT k7 d� Z+eser ejX d� � e� dd�� Z- G d � d
ej\ � Z/ G d� de/� Z0e+ G d
� de/� � Z1e2dk( r ejf � yy# e%$ r dZ$Y ��w xY w)z|
Test harness for the venv module.
Copyright (C) 2011-2012 Vinay Sajip.
Licensed to the PSF under a contributor agreement.
� N)�captured_stdout�captured_stderr�*skip_if_broken_multiprocessing_synchronize�verbose�requires_subprocess�
is_emscripten�is_wasi�requires_venv_with_pip�
TEST_HOME_DIR�requires_resource�copy_python_src_ignore)�can_symlink�EnvironmentVarGuard�rmtree�TESTFN�FakePath)�patch�Mockz:cannot run venv.create from within a venv on this platformz)venv is not available on Emscripten/WASI.c �< � t j | t j t j |�� }|j � \ }}|j rEt
r|rt
|j dd� � t j |j | ||� �||fS )N)�stdout�stderr�encoding�utf-8�backslashreplace) �
subprocess�Popen�PIPE�communicate�
returncoder �print�decode�CalledProcessError)�cmdr �p�out�errs �+/usr/local/lib/python3.12/test/test_venv.py�check_outputr( . s � ������������ �A� �}�}��H�C���|�|��s��#�*�*�W�&8�9�:��+�+�
�L�L�#�s�C�)� )���8�O� c �8 � e Zd ZdZdZd� Zd� Zd� Zd� Zdd�d �Z y
)�BaseTestzBase class for venv tests.i� c �F � t j j t j � � | _ t j dk( rd| _ d| _ d| _ n+d| _ ddt j d d z f| _ d | _ t j }t j j |� d
| _ t j dk( rFt j j! |� r't j j# |� sd| _ y d
| _ y )N�nt�Scripts��Lib�Include�bin�lib�python%d.%d� �include����win32TF)�os�path�realpath�tempfile�mkdtemp�env_dir�name�bindirr3 r6 �sys�version_info�_base_executable�split�exe�platform�lexists�exists�cannot_link_exe)�self�
executables r'