| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/IPython/testing/__pycache__/ |
Upload File : |
�
�@�c| � �~ � d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZ d � ad
� Zd� Zd� ZdS )
a Global IPython app to support test running.
We must start our own ipython object and heavily muck with it so that all the
modifications IPython makes to system behavior don't send the doctest machinery
into a fit. This code should be considered a gross hack, but it gets the job
done.
� N)�Path� )�tools)�page)�io)�TerminalInteractiveShellc � � t � � S )N)�
start_ipython� � �=/usr/lib/python3/dist-packages/IPython/testing/globalipapp.py�get_ipythonr s � ��?�?�r c �� � t | � |dd�� � � � � dt j �� � t j � � � dS )zFReplace the default system call with a capturing one for doctest.
Fr )�split�depth� )�end�fileN)�print� getoutput�rstrip�sys�stdout�flush)�self�cmds r
�xsysr # sS � �
�$�.�.��E��.�
3�
3�
:�
:�
<�
<�"�3�:�V�V�V�V��J�������r c �l � t | j � |� � t j �� � dS )zDPrint the traceback purely on stdout for doctest to capture it.
)r N)r �
InteractiveTB�stb2textr r )r �etype�evalue�stbs r
�_showtracebackr$ , s0 � �
�$�
�
%�
%�c�
*�
*���<�<�<�<�<�<r c �0 � t t d� � rdS dt _ t j } t j }t j � d� � }t j � � }d|j
_ t j |�� � }|j
� t |j j � � � � |j � � � t) j t, |� � |_ t) j t0 |� � |_ |t j d<