
    i
                     $   d Z ddlZddlZddlZddlmZ ddlZ eepd                                          j	        Z
e
dz  Zd e                    d          D             Zd eD             Zd	 Zej                            d
e          d             Ze
j	        j	        j	        Z ee                    d                    Zej                            dddg          d             Zej                            de          d             Zd ZdS )zThis file tests the source code provided by the documentation.

See
- doctest documentation: https://docs.python.org/3/library/doctest.html
- :issue:`443`

This file should be tests, too:

    >>> print("Hello World!")
    Hello World!

    N)Path.z..c                 T    g | ]%}d |                     t                    j        v#|&S )fuzzing)relative_toICALENDAR_PATHparts).0files     \/root/projects/butler/venv/lib/python3.11/site-packages/icalendar/tests/test_with_doctest.py
<listcomp>r      s>       ((88>>> 	>>>    z**/*.pyc           	          g | ]c}d t          |          t          t          t                              d                             dd                              dd          z   dS )	icalendar\/r   )strlenr   replace)r
   python_files     r   r   r      sr       
 		 	+s3~..//"45WT3WS#  r   c                  &    t           t          v sJ d S N)__name__MODULE_NAMES r   r   test_this_module_is_among_themr   '   s    |######r   module_namec                    	 t          j        |           }n2# t          $ r%}|j        dk    rt	          j        d            d}~ww xY wt          j        || |          }|j        dk    sJ |j         d|              dS )z,This test runs doctest on the Python module.pytzz,pytz is not installed, skipping this module.N)nameglobsr    errors in )		importlibimport_moduleModuleNotFoundErrorr!   pytestskipdoctesttestmodfailed)r   env_for_doctestmoduleetest_results        r   test_docstring_of_python_filer0   +   s    (55   6VKFGGG /&{/RRRK"""{'9$S$Sk$S$S"""""s    
A AAz**/*.rstfilenamez
README.rstz	index.rstc                 L     t           fdt          D                       sJ d S )Nc              3   .   K   | ]}|j         k    V  d S r   )r!   )r
   pathr1   s     r   	<genexpr>z)test_files_is_included.<locals>.<genexpr>E   s*      @@tyH$@@@@@@r   )anyDOCUMENT_PATHS)r1   s   `r   test_files_is_includedr8   =   s4     @@@@@@@@@@@@@@r   documentc                 J   	 ddl }n$# t          $ r t          j        d           Y nw xY w	 t	          j        | d|d          }|                                 n# |                                 w xY w|j        dk    s&J |j         dt          |           j	                     dS )z^This test runs doctest on a documentation file.

    functions are also replaced to work.
    r   Nz'pytz not installed, skipping this file.F)module_relativer"   raise_on_errorr#   )
r    ImportErrorr'   r(   r)   testfileuse_zoneinfor+   r   r!   )r9   zoneinfo_onlyr,   tzpr    r/   s         r   test_documentation_filerB   H   s    ? ? ? ?=>>>>>?&e?SX
 
 
 	"""??$x..*=?? #""""s    ((A A/c                 &    dt           j        v sJ dS )z#Allow importing zoneinfo for tests.zoneinfoN)sysmodules)r,   s    r   test_can_import_zoneinforG   ^   s    $$$$$$r   )__doc__r)   r$   rE   pathlibr   r'   __file__absoluteparentHEREr   globPYTHON_FILESr   r   markparametrizer0   
REPOSITORYlistr7   r8   rB   rG   r   r   r   <module>rT      s         



       tHO%%''. ##I..   
 $  $ $ $ 55	T 	T 65	T [&
jooj1122  A A A ^44  54*% % % % %r   