
    ^h                        S SK r S SKrS SKrS SKrSSKJrJrJr  \R                  " 5       S:H  r	\ R                  " S5      R                  5       r\R                  SS S:H  r\R                  R!                  \	SS9\R                  R#                  S	S\R%                  5       //5      S
 5       5       r\R                  R!                  \	SS9\R                  R#                  SSS/SS/SS/SS/SS//5      S 5       5       r\R                  R!                  \	SS9\R                  R#                  SSS/SS/SS/SS/SS/SS/SS//5      S 5       5       r\R                  R!                  \	(       + SS9\R                  R#                  SSS/SS/SS//5      S 5       5       r\R                  R!                  \SS9\R                  R!                  \	SS9\R                  R#                  S	\" \S -  5      \S -  R%                  5       //5      S! 5       5       5       r\R                  R!                  \	(       + SS9\R                  R#                  S	SS"/S#S"/S$S%//5      S& 5       5       r\R                  R!                  \	SS9\R                  R#                  S'S(S)/S*S+/S,S-//5      S. 5       5       r\R                  R!                  \	(       + SS9\R                  R#                  S/S(S0/S*S1//5      S2 5       5       rg)3    N   )file_uri_to_pathis_relativenormalized_uriWindows~)      z!can't test POSIX paths on Windows)reasonzroot_dir, expected_root_uric                 &    [        U 5      U:X  d   eg Nr   root_direxpected_root_uris     V/home/james-whalen/.local/lib/python3.13/site-packages/jupyter_lsp/tests/test_paths.pytest_normalize_posix_path_homer      s     (#'8888    z
root, pathz~/az	~/a/../b//z/az/a/bz	/a/b/../cc                 (    [        X5      (       d   eg r   r   rootpaths     r   test_is_relative_okr      s     t""""r   z~/..z/a/b/..z/a/../bza//c                 (    [        X5      (       a   eg r   r   r   s     r   test_is_relative_not_okr      s     4&&&&&r   z!can't test Windows paths on POSIXzc:\Users\user1z	c:\Users\zd:\zc:\Userszc:\Users\..c                 (    [        X5      (       a   eg r   r   r   s     r   test_is_relative_not_ok_winr   .   s     4&&&&&r   z%can't test non-existent paths on py35fooc                 &    [        U 5      U:X  d   eg r   r   r   s     r   %test_normalize_posix_path_home_subdirr"   ;   s     (#'8888r   zfile:///c:/Users/user1zC:\Users\user1//VBOXSVR/shared-folderzfile://vboxsvr/shared-folder/c                      [        U 5      nX!:X  d   eg ! [         a&  n[        R                  S:  a  U S:X  a   S nAg UeS nAff = f)N)r	      r#   )r   FileNotFoundErrorsysversion_info)r   r   
normalizederrs       r    test_normalize_windows_path_caser+   J   sO    #H-
 ***  g%(6O*O		s    
AA A  A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                 &    [        U 5      U:X  d   eg r   r   )file_uriexpected_posix_paths     r   test_file_uri_to_path_posixr0   _   s     H%)<<<<r   zfile_uri, expected_windows_pathzC:/Windows/System32/Drivers/etczC:/some dir/some file.txtc                 &    [        U 5      U:X  d   eg r   r-   )r.   expected_windows_paths     r   test_file_uri_to_path_windowsr3   l   s     H%)>>>>r   )pathlibplatformr'   pytestpathsr   r   r   systemWINPath
expanduserHOMEr(   PY35markskipifparametrizeas_urir   r   r   r   strr"   r+   r0   r3    r   r   <module>rD      s     
  A Aoo9$||C##%
v% C CD6#t{{}9M8NO9 P E9 C CD	5\C%SzD&>D+CVW#	 E
# C CD	f	c
	s			y	u' E' G$GH	]+	V$	o&' I' D!HIC CD! 
TE\	TE\11349 E J9 G$GH!	56	56	"$CD	+ I	+ C CD#	24VW	02NO	,.HI= E= G$GH% 
34UV	02MN? I?r   