
    DIe                         d Z ddlmZ ddlmZ ddlZddlmZ ddlm	Z	  ej
        d          d	             Z ej
        d          d
             Z ej
        d          d             ZdS )z:Collection of pytest fixtures used in conda.notices tests.    )Path)mockN)NOTICES_CACHE_SUBDIR)conda_argparsefunction)scopec              #      K   t          j        d          5 }| |_        t          |                               t
                    }|                    dd           |V  ddd           dS # 1 swxY w Y   dS )zi
    Fixture that creates the notices cache dir while also mocking
    out a call to user_cache_dir.
    z"conda.notices.cache.user_cache_dirT)parentsexist_okN)r   patchreturn_valuer   joinpathr   mkdir)tmpdiruser_cache_dir	cache_dirs      >lib/python3.11/site-packages/conda/testing/notices/fixtures.pynotices_cache_dirr      s       
8	9	9 ^&,#LL))*>??	t444                 s   A
A..A25A2c               #      K   t          j        d          5 } t          j                    | _        | V  d d d            d S # 1 swxY w Y   d S )Nzconda.notices.fetch.get_session)r   r   	MagicMockr   )mock_get_sessions    r   notices_mock_fetch_get_sessionr      s      	5	6	6 :J(,(8(8%                 s   AAAc                  \    t          j                    } |                     dg          }|| fS )Nnotices)r   generate_parser
parse_args)parserargss     r   conda_notices_args_n_parserr   "   s/    +--Fi[))D<    )__doc__pathlibr   unittestr   pytestconda.base.constantsr   	conda.clir   fixturer   r   r    r    r   <module>r)      s    A @              5 5 5 5 5 5 $ $ $ $ $ $ j!!!
 
 "!
 j!!!  "! j!!!  "!  r    