o
    5h	                     @   s   d Z ddlZddlZejejeejejZej	de ddl
Z
ddlZeeZddlmZ g ZdZdd Zdd Zd	d
 Zdd Zedkr^ddlZeeejdd  pZd dS dS )z7passlib.tests.tox_support - helper script for tox tests    N)print_zpasslib.tests.test_handlersc                     s~    st t dS dt  	  d dkr!d d   dd= nnqdd	lm}  fd
dt|D }td| | S )z6return list of hash algorithm tests that match regexesN Tr   z--method.      )test_handlersc                    s<   g | ]   d st fddD rtd    qS )_c                 3   s    | ]	}t | V  qd S )N)rematch).0argname m/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/passlib/tests/tox_support.py	<genexpr>*   s    z+do_hash_tests.<locals>.<listcomp>.<genexpr>:)
startswithanyTH_PATH)r   argssuffixr   r   
<listcomp>)   s
    z!do_hash_tests.<locals>.<listcomp>
)printr   listpasslib.testsr   dirr   join)r   r   namesr   r   r   do_hash_tests   s   r!   c                 C   s>   | dks| dkrt dd | dkrtd dS dS td|  )z return list of preset test namesdjangozdjango-hasheszdjango_.*_testhex_md5_testzpasslib.tests.test_ext_djangozunknown name: %rN)r!   r   
ValueErrorr   r   r   r   do_preset_tests.   s   
r%   c                 C   s(   ddl m} |tj| dd|  dS )zEwrite fake GAE ``app.yaml`` to current directory so nosegae will workr   )set_filezapp.yamlzapplication: fake-app
version: 2
runtime: %s
api_version: 1
threadsafe: no

handlers:
- url: /.*
  script: dummy.py

libraries:
- name: django
  version: "latest"
N)passlib.tests.utilsr&   ospathr   )r)   runtimer&   r   r   r   do_setup_gae7   s   
r+   c                 G   s   t  d|   | S )Ndo_)globals)cmdr   r   r   r   mainJ   s   r/   __main__r   )__doc__r(   sysr)   r   dirname__file__pardirroot_dirinsertr	   logging	getLogger__name__logpasslib.utils.compatr   __all__r   r!   r%   r+   r/   exitargvr   r   r   r   <module>   s"    	 