o
    i
                     @   s  d dl Z d dlZd dlZd dlZddlmZmZ e dkZe 	d
 Zejdd dkZejjeddejd	de ggd
d Zejjeddejjeddejd	eed ed  ggdd Zejje ddejd	ddgddgddggdd Zejjeddejdddgddgddggdd  Zejje ddejd!dd"gdd#ggd$d% ZdS )&    N   )file_uri_to_pathnormalized_uriWindows~)      z!can't test POSIX paths on Windows)reasonzroot_dir, expected_root_uric                 C      t | |ksJ d S Nr   root_direxpected_root_uri r   W/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/jupyter_lsp/tests/test_paths.pytest_normalize_posix_path_home   s   r   z%can't test non-existent paths on py35fooc                 C   r
   r   r   r   r   r   r   %test_normalize_posix_path_home_subdir   s   r   z!can't test Windows paths on POSIXzc:\Users\user1zfile:///c:/Users/user1zC:\Users\user1z//VBOXSVR/shared-folderzfile://vboxsvr/shared-folder/c              
   C   sR   zt | }W n ty  } ztjdkrW Y d }~d S |d }~ww ||ks'J d S )N)r   
   )r   FileNotFoundErrorsysversion_info)r   r   
normalizederrr   r   r    test_normalize_windows_path_case#   s   
r   zfile_uri, expected_posix_pathz'file:///C:/Windows/System32/Drivers/etcz /C:/Windows/System32/Drivers/etcz%file:///C:/some%20dir/some%20file.txtz/C:/some dir/some file.txtz!file:///home/user/some%20file.txtz/home/user/some file.txtc                 C   r
   r   r   )file_uriexpected_posix_pathr   r   r   test_file_uri_to_path_posix9      
r   zfile_uri, expected_windows_pathzC:/Windows/System32/Drivers/etczC:/some dir/some file.txtc                 C   r
   r   r   )r   expected_windows_pathr   r   r   test_file_uri_to_path_windowsF   r    r"   )pathlibplatformr   pytestpathsr   r   systemWINPath
expanduserHOMEr   PY35markskipifparametrizeas_urir   strr   r   r   r"   r   r   r   r   <module>   sZ    