| Server IP : 217.160.0.135 / Your IP : 216.73.216.115 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 : /lib/python3/dist-packages/IPython/lib/tests/__pycache__/ |
Upload File : |
�
�@�ca$ � �z � d Z ddlmZmZ ddlmZmZmZ ddl Z ddl
mZmZ ddl
Z
ddlZddlmZ ddlZ ddlZn# e$ r Y nw xY wddlmZ ddlmZ d � Zd
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� Z d� Z!d� Z"d� Z#d� Z$d� Z% G d� de� � Z&d� Z' e'� � G d� de&� � � � Z(ed d�� � Z)d� Z*d� Z+dS )!z Tests for IPython.lib.display.
� )�NamedTemporaryFile�mkdtemp)�split�join�dirnameN)�TestCase�mock)�BytesIO)�display)�skipif_not_numpyc �z � t j d� � } t j t j d� � � � } dS )z(FileLink: Test class can be instantiated�example.txtN)r �FileLink�pathlib�PurePath��fls �@/usr/lib/python3/dist-packages/IPython/lib/tests/test_display.py�test_instantiation_FileLinkr , s1 � � � �-� (� (�B� � �'�*�=�9�9� :� :�B�B�B� c � � t j d� � } | � � � � d� � sJ �dS )zEFileLink: Calling _repr_html_ on non-existent files returns a warningr zPath (<tt>example.txt</tt>)N)r r �_repr_html_�
startswithr s r �*test_warning_on_non_existent_path_FileLinkr 2 s= � � � �-� (� (�B�
�>�>���&�&�'D�E�E�E�E�E�E�Er c � � t � � } t j | j � � }|� � � }d| j �d| j �d�}||k sJ �dS )zMFileLink: Calling _repr_html_ functions as expected on existing filepath
z <a href='�' target='_blank'>�</a><br>N)r r r �namer ��tfr �actual�expecteds r �test_existing_path_FileLinkr# 8 s_ � �
� � �B� � �"�'� "� "�B�
�^�^�
�
�F�F�<>�G�G�G�R�W�W�W�M�H��X������r c � � t � � } t j | j � � }t |� � }| j }||k sJ �dS )zHFileLink: Calling repr() functions as expected on existing filepath
N)r r r r �reprr s r � test_existing_path_FileLink_reprr&