o
    i                     @   s   d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	m
Z
mZ ddlmZ ddlmZ dd Zd	d
 Zdd Zdd Zejjejdkdddd ZdS )zTest HTML utils    Ncheck_help_all_output)
url_escapeurl_unescape	is_hiddenis_file_hidden)cast_unicode)TemporaryDirectoryc                   C   s   t d dS )z!jupyter notebook --help-all worksnotebookNr    r   r   T/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/notebook/tests/test_utils.pytest_help_output   s   r   c                  C   T   t d} | dks
J t d} | dksJ t d} | dksJ t d} | dks(J d S )	N/this is a test/for spaces/#/this%20is%20a%20test/for%20spaces/notebook with space.ipynbnotebook%20with%20space.ipynb%/path with a/notebook and space.ipynb-/path%20with%20a/notebook%20and%20space.ipynb,/ !@$#%^&* / test %^ notebook @#$ name.ipynbT/%20%21%40%24%23%25%5E%26%2A%20/%20test%20%25%5E%20notebook%20%40%23%24%20name.ipynb)r   pathr   r   r   test_url_escape   s   r   c                  C   r   )	Nr   r   r   r   r   r   r   r   )r   r   r   r   r   test_url_unescape(   s   r   c                  C   sR  t  } tj| d}t| t|| dksJ t|dks!J tj| d}t| t|| dks6J t|dks>J t||dksGJ tj| dd}t| t|| dks]J t|dkseJ tj| dd}t| t|| dks{J t|dksJ t|dksJ t|t|dksJ W d    d S 1 sw   Y  d S )	NsubdirFz.subdir2Tsubdir3z.subdir4z.subdir5subdir6)r	   osr   joinmakedirsr   r   stat)rootsubdir1subdir2subdir34subdir56r   r   r   test_is_hidden9   s*   



"r'   win32zrun on windows only)reasonc                  C   s   t  9} t| } tj| d}t| t|| rJ tjj	
|d}t| t|| s.J t|s4J W d    d S 1 s?w   Y  d S )Nr      )r	   r   r   r   r   r    r   ctypeswindllkernel32SetFileAttributesWprintr   )r"   r#   rr   r   r   test_is_hidden_win32S   s   
"r1   )__doc__r+   r   syspytesttraitlets.tests.utilsr   notebook.utilsr   r   r   r   ipython_genutils.py3compatr   ipython_genutils.tempdirr	   r   r   r   r'   markskipifplatformr1   r   r   r   r   <module>   s    