
    7Th'                         S SK r S SKJr  S SKrS SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr  S SKJr   " S	 S
5      r " S S\5      rg)    N)md5LocalFileSystem)AbstractCopyTests)AbstractGetTests)AbstractOpenTests)AbstractPipeTests)AbstractPutTestsc                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
\R                  S 5       r\R                  S 5       r\R                  S	 5       r\R                  S
 5       r\R                  S 5       r\R                  S 5       rS rS rS rS rSrg)BaseAbstractFixtures   z
Abstract base class containing fixtures that are used by but never need to
be overridden in derived filesystem-specific classes to run the abstract
tests on such filesystems.
c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on remote filesystem that is used for many cp/get/put tests.

Cleans up at the end of each test it which it is used.
T	recursiveN_bulk_operations_scenario_0rmselffsfs_joinfs_pathsources        V/var/www/auris/envauris/lib/python3.13/site-packages/fsspec/tests/abstract/__init__.pyfs_bulk_operations_scenario_02BaseAbstractFixtures.fs_bulk_operations_scenario_0   s.      11"wG
f%   (*c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on remote filesystem that is used for glob edge cases cp/get/put tests.

Cleans up at the end of each test it which it is used.
Tr   N_glob_edge_cases_filesr   r   s        r   fs_glob_edge_cases_files-BaseAbstractFixtures.fs_glob_edge_cases_files    s.      ,,R'B
f%r   c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on remote filesystem that is used to check cp/get/put on directory
and file with the same name prefixes.

Cleans up at the end of each test it which it is used.
Tr   N#_dir_and_file_with_same_name_prefixr   r   s        r   %fs_dir_and_file_with_same_name_prefix:BaseAbstractFixtures.fs_dir_and_file_with_same_name_prefix+   s.      99"wO
f%r   c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on remote filesystem that is used to check cp/get/put files order
when source and destination are lists.

Cleans up at the end of each test it which it is used.
Tr   N_10_files_with_hashed_namesr   r   s        r   fs_10_files_with_hashed_names2BaseAbstractFixtures.fs_10_files_with_hashed_names7   s.      11"wG
f%r   c              #   t   #    U" US5      nUv   UR                  U5      (       a  UR                  USS9  gg7f)z
Return name of remote directory that does not yet exist to copy into.

Cleans up at the end of each test it which it is used.
targetTr   Nexistsr   )r   r   r   r   r.   s        r   	fs_targetBaseAbstractFixtures.fs_targetC   s<      (+99VEE&DE)    68c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z~
Scenario on local filesystem that is used for many cp/get/put tests.

Cleans up at the end of each test it which it is used.
Tr   Nr   r   local_fs
local_join
local_pathr   s        r    local_bulk_operations_scenario_05BaseAbstractFixtures.local_bulk_operations_scenario_0O   s.      11(
SFd+r   c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on local filesystem that is used for glob edge cases cp/get/put tests.

Cleans up at the end of each test it which it is used.
Tr   Nr   r5   s        r   local_glob_edge_cases_files0BaseAbstractFixtures.local_glob_edge_cases_filesZ   s.      ,,X:NFd+r   c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on local filesystem that is used to check cp/get/put on directory
and file with the same name prefixes.

Cleans up at the end of each test it which it is used.
Tr   Nr$   r5   s        r   (local_dir_and_file_with_same_name_prefix=BaseAbstractFixtures.local_dir_and_file_with_same_name_prefixe   s3      99*
 Fd+r   c              #   X   #    U R                  XU5      nUv   UR                  USS9  g7f)z
Scenario on local filesystem that is used to check cp/get/put files order
when source and destination are lists.

Cleans up at the end of each test it which it is used.
Tr   Nr)   r5   s        r    local_10_files_with_hashed_names5BaseAbstractFixtures.local_10_files_with_hashed_namesu   s.      11(
SFd+r   c              #   t   #    U" US5      nUv   UR                  U5      (       a  UR                  USS9  gg7f)z~
Return name of local directory that does not yet exist to copy into.

Cleans up at the end of each test it which it is used.
r.   Tr   Nr/   )r   r6   r7   r8   r.   s        r   local_target!BaseAbstractFixtures.local_target   s<      J1??6""KK$K/ #r3   c                 x   U" US5      nUR                  U" US5      5        UR                  U" US5      5        [        S5       Hq  nU" USU 35      nU" US5      nUR                  U5        UR                  U" US5      5        UR                  U" US5      5        UR                  U" US	5      5        Ms     U$ )
u  
Scenario that is used for glob edge cases cp/get/put tests.
Creates the following directory and file structure:

📁 source
├── 📄 file1
├── 📄 file2
├── 📁 subdir0
│   ├── 📄 subfile1
│   ├── 📄 subfile2
│   └── 📁 nesteddir
│       └── 📄 nestedfile
└── 📁 subdir1
    ├── 📄 subfile1
    ├── 📄 subfile2
    └── 📁 nesteddir
        └── 📄 nestedfile
r   file1file2   subdir	nesteddirsubfile1subfile2
nestedfile)touchrangemakedirs)r   some_fs	some_join	some_pathr   
subdir_idxrK   rL   s           r   r    +BaseAbstractFixtures._glob_edge_cases_files   s    & 9h/i01i01(Jv
|'<=F!&+6IY'MM)FJ78MM)FJ78MM)I|<= #     c                 N   U" US5      nU" US5      nU" US5      nUR                  U5        UR                  U" US5      5        UR                  U" US5      5        UR                  U" US5      5        UR                  U" US5      5        UR                  U" US5      5        U$ )	u*  
Scenario that is used for many cp/get/put tests. Creates the following
directory and file structure:

📁 source
├── 📄 file1
├── 📄 file2
└── 📁 subdir
    ├── 📄 subfile1
    ├── 📄 subfile2
    └── 📁 nesteddir
        └── 📄 nestedfile
r   rK   rL   rH   rI   rM   rN   rO   rR   rP   )r   rS   rT   rU   r   rK   rL   s          r   r   0BaseAbstractFixtures._bulk_operations_scenario_0   s     9h/68,fk2	#i01i01i
34i
34i	<89rX   c                     U" US5      nU" US5      nU" US5      nU" US5      nUR                  U5        UR                  U5        UR                  U5        U$ )u   
Scenario that is used to check cp/get/put on directory and file with
the same name prefixes. Creates the following directory and file structure:

📁 source
├── 📄 subdir.txt
└── 📁 subdir
    └── 📄 subfile.txt
r   rK   z
subdir.txtzsubfile.txtrZ   )r   rS   rT   rU   r   rK   filesubfiles           r   r%   8BaseAbstractFixtures._dir_and_file_with_same_name_prefix   s_     9h/68,.FM2 dgrX   c                     U" US5      n[        S5       H]  n[        [        U5      R                  S5      5      R	                  5       nU" XF S35      nUR                  Xu R                  5       S9  M_     U$ )u   
Scenario that is used to check cp/get/put files order when source and
destination are lists. Creates the following directory and file structure:

📁 source
└── 📄 {hashed([0-9])}.txt
r   
   zutf-8z.txt)pathvalue)rQ   r   strencode	hexdigestpipe)r   rS   rT   rU   r   ihashed_irb   s           r   r*   0BaseAbstractFixtures._10_files_with_hashed_names   sl     9h/rA3q6==12<<>HVz%67DLLdC--/L:  rX    N)__name__
__module____qualname____firstlineno____doc__pytestfixturer   r!   r&   r+   r1   r9   r<   r?   rB   rE   r    r   r%   r*   __static_attributes__rk   rX   r   r   r      s    ^^& & ^^& & ^^	& 	& ^^	& 	& ^^	* 	* ^^, , ^^, , ^^, , ^^	, 	, ^^	0 	0B2&rX   r   c                   @   \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  " SS9S 5       r
\R                  S	 5       r\R                  S
 5       r\R                  S 5       r\R                  S 5       rSrg)AbstractFixtures   ae  
Abstract base class containing fixtures that may be overridden in derived
filesystem-specific classes to run the abstract tests on such filesystems.

For any particular filesystem some of these fixtures must be overridden,
such as ``fs`` and ``fs_path``, and others may be overridden if the
default functions here are not appropriate, such as ``fs_join``.
c                     [        S5      eNz3This function must be overridden in derived classesNotImplementedErrorr   s    r   r   AbstractFixtures.fs       !"WXXrX   c                 6    [         R                  R                  $ )z
Return a function that joins its arguments together into a path.

Most fsspec implementations join paths in a platform-dependent way,
but some will override this to always use a forward slash.
osrb   joinr{   s    r   r   AbstractFixtures.fs_join   s     ww||rX   c                     [        S5      erx   ry   r{   s    r   r   AbstractFixtures.fs_path  r}   rX   class)scopec                     [        SS9$ )NT)
auto_mkdirr   r{   s    r   r6   AbstractFixtures.local_fs  s     $//rX   c                 6    [         R                  R                  $ )z[
Return a function that joins its arguments together into a path, on
the local filesystem.
r   r{   s    r   r7   AbstractFixtures.local_join  s     ww||rX   c                     U$ Nrk   )r   tmpdirs     r   r8   AbstractFixtures.local_path  s    rX   c                     g)z@
Return whether this implementation supports empty directories.
Trk   r{   s    r   supports_empty_directories+AbstractFixtures.supports_empty_directories  s    
 rX   c                     S $ )Nc                     U $ r   rk   )xs    r   <lambda>3AbstractFixtures.fs_sanitize_path.<locals>.<lambda>!  s    rX   rk   r{   s    r   fs_sanitize_path!AbstractFixtures.fs_sanitize_path  s    rX   rk   N)rl   rm   rn   ro   rp   rq   rr   r   r   r   r6   r7   r8   r   r   rs   rk   rX   r   ru   ru      s     ^^Y Y ^^  ^^Y Y ^^'"0 #0
 ^^  ^^  ^^  ^^ rX   ru   )r   hashlibr   rq   fsspec.implementations.localr   fsspec.tests.abstract.copyr   fsspec.tests.abstract.getr   fsspec.tests.abstract.openr   fsspec.tests.abstract.piper	   fsspec.tests.abstract.putr
   r   ru   rk   rX   r   <module>r      s:    	   8 8 6 8 8 6Y Yx7+ 7rX   