+
    Bi6                     2   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^RI
Ht ^ RIHtHt ]P                  R 4       t ! R R4      t ! R	 R
]]P$                  ]P&                  4      t ! R R]]P*                  ]P&                  4      t ! R R]]P$                  ]P&                  4      t ! R R]]P*                  ]P&                  4      t ! R R4      t ! R R4      t ! R R]]P$                  ]]P&                  4      t ! R R]]P*                  ]]P&                  4      t ! R R4      t ! R R]]P$                  ]]P&                  4      t ! R R]]P*                  ]]P&                  4      t] R8X  d   ]PB                  ! 4        R# R# )     N)	resources)Traversable)util)	os_helperimport_helperc               #      "   \         P                  ! R R7      ;_uu_ 4       p \         P                  ! R\        R7       V x  RRR4       R#   + '       g   i     R# ; i5i)T)recorddefault)categoryN)warningscatch_warningssimplefilterDeprecationWarning)ctxs    ?/usr/lib/python3.14/test/test_importlib/resources/test_files.pysuppress_known_deprecationr      s<     		 	 	-	-i2DE	 
.	-	-	-s    A!!A
A!A		A!c                   >   a  ] tR t^t o R tR tR tR tR tRt	V t
R# )
FilesTestsc                    \         P                  ! V P                  4      pVP                  R 4      P	                  4       pR# )
utf-8.fileN)r   filesdatajoinpath
read_bytesselfr   actuals   &  r   test_read_bytesFilesTests.test_read_bytes   s+    		*-88:    c                    \         P                  ! V P                  4      pVP                  R 4      P	                  RR7      pR# )r   utf-8encodingN)r   r   r   r   	read_textr   s   &  r   test_read_textFilesTests.test_read_text   s0    		*-777Ir    c                    R # N r   s   &r   test_traversableFilesTests.test_traversable!       r    c                    \         P                  ! V P                  4      pVP                  R R4      pV P	                  VP                  4       4       R# )subdirectoryzbinary.fileN)r   r   r   r   
assertTrueis_file)r   r   binfiles   &  r    test_joinpath_with_multiple_args+FilesTests.test_joinpath_with_multiple_args$   s7    		*..?)*r    c                    \        4       ;_uu_ 4        \        P                  ! V P                  R7       RRR4       R#   + '       g   i     R# ; i)z`
Files used to take a 'package' parameter. Make sure anyone
passing by name is still supported.
)packageN)r   r   r   r   r+   s   &r   test_old_parameterFilesTests.test_old_parameter)   s,    
 ())OODII. *)))s	   "?A	r*   N)__name__
__module____qualname____firstlineno__r   r&   r,   r4   r8   __static_attributes____classdictcell____classdict__s   @r   r   r      s$     2
1
C+
/ /r    r   c                       ] tR t^2tRtR# )OpenDiskTestsr*   Nr:   r;   r<   r=   r>   r*   r    r   rC   rC   2       r    rC   c                       ] tR t^6tRtR# )OpenZipTestsr*   NrD   r*   r    r   rG   rG   6   rE   r    rG   c                   *   a  ] tR t^:t o RtR tRtV tR# )OpenNamespaceTestsnamespacedata01c                p    ^ RI pVP                  P                  R4       \        P                  ! V4       R# )a  
Non-path items in a namespace package's ``__path__`` are ignored.

As reported in python/importlib_resources#311, some tools
like Setuptools, when creating editable packages, will inject
non-paths into a namespace package's ``__path__``, a
sentinel like
``__editable__.sample_namespace-1.0.finder.__path_hook__``
to cause the ``PathEntryFinder`` to be called when searching
for packages. In that case, resources should still be loadable.
Nz6__editable__.sample_namespace-1.0.finder.__path_hook__)rJ   __path__appendr   r   )r   rJ   s   & r   test_non_paths_in_dunder_path0OpenNamespaceTests.test_non_paths_in_dunder_path=   s,     	  ''D	
 	(r    r*   N)r:   r;   r<   r=   MODULErN   r>   r?   r@   s   @r   rI   rI   :   s     F) )r    rI   c                       ] tR t^RtRtRtR# )OpenNamespaceZipTestsrJ   r*   N)r:   r;   r<   r=   
ZIP_MODULEr>   r*   r    r   rR   rR   R   s    "Jr    rR   c                   .   a  ] tR t^Vt o RtRtR tRtV tR# )
DirectSpeczA
Override behavior of ModuleSetup to write a full spec directly.
unusedc                <    V P                  V P                  4       R # r)   )tree_on_pathspec)r   names   &&r   load_fixtureDirectSpec.load_fixture]   s    $))$r    r*   N)	r:   r;   r<   r=   __doc__rP   r[   r>   r?   r@   s   @r   rU   rU   V   s      F% %r    rU   c                   2   a  ] tR t^at o RRRR/tR tRtV tR# )ModulesFileszmod.py res.txtresources are the bestc                x    ^ RI p\        P                  ! V4      P                  R4      P	                  RR7      pR# )z;
A module can have resources found adjacent to the module.
Nra   r"   r#   )modr   r   r   r%   )r   rd   r   s   &  r   test_module_resources"ModulesFiles.test_module_resourcesg   s.     	%..y9CCWCUr    r*   N)r:   r;   r<   r=   rY   re   r>   r?   r@   s   @r   r_   r_   a   s!     "+D
. .r    r_   c                       ] tR t^qtRtR# )ModuleFilesDiskTestsr*   NrD   r*   r    r   rh   rh   q   rE   r    rh   c                       ] tR t^utRtR# )ModuleFilesZipTestsr*   NrD   r*   r    r   rj   rj   u   rE   r    rj   c                      a  ] tR t^yt o ]P
                  ! R]P                    R24      tRR]R]RR/RR]P                  ]P                   R	4      RR//t	R
 t
R tR tR tRtV tR# )ImplicitContextFilesz
        import zZ as res
        val = res.files().joinpath('res.txt').read_text(encoding='utf-8')
        somepkgz__init__.pyz	submod.pyra   rb   	frozenpkgc_resourcesc                    R# zG
Without any parameter, files() will infer the location as the caller.
Nr*   r+   s   &r   test_implicit_files_package0ImplicitContextFiles.test_implicit_files_package   r.   r    c                    R# rq   r*   r+   s   &r   test_implicit_files_submodule2ImplicitContextFiles.test_implicit_files_submodule   r.   r    c                   V P                   P                  \        P                  ! 4       4      p\        P
                  ! VR4      p\        P
                  ! \        P                  4      P                  pVP                  R4       FH  pVP                  VP                  V4      4      P                  R4      p\        P                  ! WE4       KJ  	  V P                   P                  \        P                   ! V4      4       R# )z
Make a compiled-only copy of the importlib resources package.

Currently only code is copied, as importlib resources doesn't itself
have any resources.
ro   z**/*.pyz.pycN)fixturesenter_contextr   temp_dirpathlibPathr   __file__parentglobr   relative_towith_suffix
py_compilecompiler   DirsOnSysPath)r   bin_sitero   sourcessource_pathc_paths   &     r   _compile_importlib'ImplicitContextFiles._compile_importlib   s     ==..y/A/A/CDll8];,,y11299"<<	2K ))+*A*A'*JKWWX^_F{3 3 	##M$?$?$IJr    c                &    V P                  4        R# )zS
Caller detection works for compiled-only resources module.

python/cpython#123085
N)r   r+   s   &r   +test_implicit_files_with_compiled_importlib@ImplicitContextFiles.test_implicit_files_with_compiled_importlib   s     	!r    r*   N)r:   r;   r<   r=   textwrapdedentr   set_valreplacerY   rr   ru   r   r   r>   r?   r@   s   @r   rl   rl   y   s     oo""# $		G 	7/

 	7??9+=+=}M/

DRYK T Tr    rl   c                       ] tR t^tRtR# )ImplicitContextFilesDiskTestsr*   NrD   r*   r    r   r   r           	r    r   c                       ] tR t^tRtR# )ImplicitContextFilesZipTestsr*   NrD   r*   r    r   r   r      r   r    r   __main__)"r{   r   r   unittestr   	importlib
contextlibr   importlib.resources.abcr   r`   r   test.supportr   r   contextmanagerr   r   	DiskSetupTestCaserC   ZipSetuprG   rI   rR   rU   r_   rh   rj   rl   r   r   r:   mainr*   r    r   <module>r      s_           /  1  / /8	J0A0A 		:t}}h.?.? 	)T^^X5F5F )0#Jx7H7H #% %. . 	:t~~|XEVEV 		*dmm\8CTCT 	6T 6Tr	 4h6G6G		3X5F5F	 zMMO r    