
    q'Ve                         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                            dgd eD             d eD                       d             Z	d	 Z
d
 Zd ZdS )zTest the QtPy CLI.    N	mypy-args
subcommandc                     g | ]}|gS  r   .0r   s     3lib/python3.11/site-packages/qtpy/tests/test_cli.py
<listcomp>r
      s    :::

|:::    c                 8    g | ]}d                      |          S ) )joinr   s     r	   r
   r
      s$    <<<**		<<<r   )argnames	argvaluesidsc                 T    t          j        t          j        ddg| dd           d S )N-mqtpyz--helpT)check)
subprocessrunsys
executable)r   s    r	   test_cli_help_does_not_failr      s@     N	v=
=H=     r   c                      t          j        t          j        dddg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__)outputs    r	   test_cli_versionr&      sj    ^	v{3	  F =  &&((,0@@@@@@@r   c                     t          j        t          j        dddgddd          } t          j        rd                    g d          }nt          j        rd                    g d	          }n\t          j        rd                    g d
          }n8t          j	        rd                    g d          }nt          j        d           | j                                        |                                k    sJ 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%   expecteds     r	   test_cli_mypy_argsr4   '   s1   ^	v{3	  F z %/88  
 
 
 /88  
 
 
 /88  
 
 
 
/88  
 
 	-...=  HNN$4$4444444r   c                     t          j        t          j        dddgddd          } t          j        rt          j        d          }nwt          j        rt          j        d          }nVt          j	        rt          j        d	          }n5t          j
        rt          j        d
          }nt          j        d           | j                                        |                                k    sJ 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/   r0   r1   r!   r"   r2   s     r	   test_cli_pyright_configr8   Y   s   ^	v'78	  F z 9,?

 
 
 +,?

 
 
 ,?

 
 
 ,?

 
 	*+++=  HNN$4$4444444r   )__doc__r   r   r6   r0   r   SUBCOMMANDSmarkparametrizer   r&   r4   r8   r   r   r	   <module>r=      s          



    M ^::k:::<<<<<   
  
A A A/5 /5 /5dC5 C5 C5 C5 C5r   