o
    tf                     @   s   d Z ddlZddlZddlZddlZddlZg dggZejjdgdd eD dd eD dd	d
 Z	dd Z
dd Zdd ZdS )zTest the QtPy CLI.    N	mypy-args
subcommandc                 C   s   g | ]}|gqS  r   .0r   r   r   \/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/qtpy/tests/test_cli.py
<listcomp>   s    r   c                 C   s   g | ]}d  |qS ) )joinr   r   r   r   r      s    )argnamesZ	argvaluesZidsc                 C   s"   t jtjddg| ddd d S )N-mqtpyz--helpT)check)
subprocessrunsys
executable)r   r   r   r   test_cli_help_does_not_fail   s   
r   c                  C   s<   t jtjdddgdddd} | j  d tjksJ d S )Nr   r   z	--versionTutf-8capture_outputr   encoding)	r   r   r   r   stdoutstripsplitr   __version__)outputr   r   r   test_cli_version   s    r   c                  C   s   t jtjdddgdddd} tjrdg d}n&tjr$dg d	}ntjr/dg d
}ntj	r:dg d}nt
d | j | ksJJ d S )Nr   r   r   Tr   r   r	   )z--always-true=PYQT5--always-false=PYSIDE2--always-false=PYQT6--always-false=PYSIDE6)--always-false=PYQT5z--always-true=PYSIDE2r    r!   )r"   r   z--always-true=PYQT6r!   )r"   r   r    z--always-true=PYSIDE6zNo Qt bindings detected)r   r   r   r   r   PYQT5r
   PYSIDE2PYQT6PYSIDE6pytestfailr   r   r   expectedr   r   r   test_cli_mypy_args'   s0   
	r+   c                  C   s   t jtjdddgdddd} tjrtd}n tjr td}ntj	r)td	}ntj
r2td
}ntd | j | ksBJ d S )Nr   r   zpyright-configTr   r   a?  
            pyrightconfig.json:
            {"defineConstant": {"PYQT5": true, "PYSIDE2": false, "PYQT6": false, "PYSIDE6": false}}

            pyproject.toml:
            [tool.pyright.defineConstant]
            PYQT5 = true
            PYSIDE2 = false
            PYQT6 = false
            PYSIDE6 = false
        a?  
            pyrightconfig.json:
            {"defineConstant": {"PYQT5": false, "PYSIDE2": true, "PYQT6": false, "PYSIDE6": false}}

            pyproject.toml:
            [tool.pyright.defineConstant]
            PYQT5 = false
            PYSIDE2 = true
            PYQT6 = false
            PYSIDE6 = false
        a?  
            pyrightconfig.json:
            {"defineConstant": {"PYQT5": false, "PYSIDE2": false, "PYQT6": true, "PYSIDE6": false}}

            pyproject.toml:
            [tool.pyright.defineConstant]
            PYQT5 = false
            PYSIDE2 = false
            PYQT6 = true
            PYSIDE6 = false
        a?  
            pyrightconfig.json:
            {"defineConstant": {"PYQT5": false, "PYSIDE2": false, "PYQT6": false, "PYSIDE6": true}}

            pyproject.toml:
            [tool.pyright.defineConstant]
            PYQT5 = false
            PYSIDE2 = false
            PYQT6 = false
            PYSIDE6 = true
        zNo valid API to test)r   r   r   r   r   r#   textwrapdedentr$   r%   r&   r'   r(   r   r   r)   r   r   r   test_cli_pyright_configY   s0   
r.   )__doc__r   r   r,   r'   r   ZSUBCOMMANDSmarkZparametrizer   r   r+   r.   r   r   r   r   <module>   s$    

2