%PDF- %PDF-
Direktori : /usr/lib/python3.12/test/support/__pycache__/ |
Current File : //usr/lib/python3.12/test/support/__pycache__/script_helper.cpython-312.pyc |
� ���f�- � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm Z d dl mZ d dlm Z dad� Z G d� d e j dd� � Z ej$ � d � � Z ej$ � d � � Zd� Zd� Z ej$ � ej. ej0 d �d�� Zd� Zdd�Zdd�Zdd�Z dd�Z ej$ � d� � Zy)� N)�source_from_cache)�support)�make_legacy_pycc � � t �Xdt j v rda yt j sda y t j t j dddg� da t S t S # t j $ r da Y t S w xY w)a Returns True if our sys.executable interpreter requires environment variables in order to be able to run at all. This is designed to be used with @unittest.skipIf() to annotate tests that need to use an assert_python*() function to launch an isolated mode (-I) or no environment mode (-E) sub-interpreter process. A normal build & test does not run into this situation but it can happen when trying to run the standard library test suite from an interpreter that doesn't have an obvious home with Python's current home finding logic. Setting PYTHONHOME is one way to get most of the testsuite to run in that situation. PYTHONPATH or PYTHONUSERSITE are other common environment variables that might impact whether or not the interpreter can start. � PYTHONHOMETF�-Ez-czimport sys; sys.exit(0)) �$__cached_interp_requires_environment�os�environr �has_subprocess_support� subprocess� check_call�sys� executable�CalledProcessError� � �1/usr/lib/python3.12/test/support/script_helper.py� interpreter_requires_environmentr s� � �$ ,�3��2�:�:�%�37�0���-�-�38�0�� 9��!�!�3�>�>�4�#'�)B�#D� E� 49�0�/�/�/�/�� �,�,� 8�37�0� 0�/� 8�s �'A% �%B�Bc � � e Zd ZdZd� Zy)�_PythonRunResultz2Helper for reporting Python subprocess run resultsc �J � d}| j | j }}t |� |kD r d|| d z }t |� |kD r d|| d z }|j dd� j � }|j dd� j � }t d| j |||fz � �)z4Provide helpful details about failed subcommand runsi0u s (... truncated stdout ...)Ns (... truncated stderr ...)�ascii�replacezRProcess return code is %d command line: %r stdout: --- %s --- stderr: --- %s ---)�out�err�len�decode�rstrip�AssertionError�rc)�self�cmd_line�maxlenr r s r �failz_PythonRunResult.failA s� � � ���8�8�T�X�X�S���s�8�f��/�#�v�g�h�-�?�C��s�8�f��/�#�v�g�h�-�?�C��j�j��)�,�3�3�5���j�j��)�,�3�3�5��� #� !%���� #� #� %�%� &� &r N)�__name__� __module__�__qualname__�__doc__r% r r r r r >