
    ~U e                        d Z ddlZddlZddlZddlZej                            e          pdZej                            e          Z	d  ej
        e	          D             Zd eD             Zd Zej                            de          d             Zej                            ed	          Zd
 dD             Zej                            dddg          d             Zej                            de          d             ZdS )a  This file tests the source code provided by the documentation.

See 
- doctest documentation: https://docs.python.org/3/library/doctest.html
- Issue 443: https://github.com/collective/icalendar/issues/443

This file should be tests, too:

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

    N.c                     g | ]R\  }}}|D ]I}|                                                     d           )t          j                            ||          JSS )z.py)lowerendswithospathjoin).0dirpathdirnames	filenamesfilenames        e/var/www/dev/btcams2023/python_venv/lib/python3.11/site-packages/icalendar/tests/test_with_doctest.py
<listcomp>r      sr       $9  	!1!1!:!:5!A!AGLL(##       c                 t    g | ]5}d |t          t                    d                             dd          z   6S )	icalendar/r   )lenICALENDAR_PATHreplace)r
   python_files     r   r   r      sO        +c.11"45==c3GGG  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        |           }t          j        ||           }|j        dk    sJ |j         d|              dS )z,This test runs doctest on the Python module.)namer    errors in N)	importlibimport_moduledoctesttestmodfailed)r    moduletest_results      r   test_docstring_of_python_filer+   #   s[     $[11F/&{;;;K"""{'9$S$Sk$S$S"""""r   z	../../../c                    g | ]}t          j        t           j                            t          |                    D ]O}|                                                    d           )t           j                            t          ||          PS )z.rst)r   listdirr   r	   DOCUMENTATION_PATHr   r   )r
   subdirr   s      r   r   r   .   s       Jrw||,>GGHH  	~~  ((	GLL#VX66   r   )docsr   r   z
README.rstz	index.rstc                 L     t           fdt          D                       sJ d S )Nc              3   B   K   | ]}|                               V  d S r   )r   )r
   r   r   s     r   	<genexpr>z)test_files_is_included.<locals>.<genexpr>:   s/      BB4t}}X&&BBBBBBr   )anyDOCUMENT_PATHS)r   s   `r   test_files_is_includedr6   5   s4    
 BBBB>BBBBBBBBBBr   documentc                     t          j        | d          }|j        dk    s1J |j         dt          j                            |                        dS )z/This test runs doctest on a documentation file.F)module_relativer   r#   N)r&   testfiler(   r   r   basename)r7   r*   s     r   test_documentation_filer<   <   s]     "8UCCCK"""{'9$b$bbgFVFVW_F`F`$b$b"""""r   )__doc__r&   r   pytestr$   r   dirname__file__HEREr   walkPYTHON_FILESr   r   markparametrizer+   r	   r.   r5   r6   r<   r   r   r   <module>rF      s     				     	wx  'C&& (/(?(?   #  
$ $ $ 55T T 65T W\\$44     &  C C	 C ^44c c 54c c cr   